Skip to content

Commit

Permalink
Migrated forum-test
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenroug committed Jan 4, 2024
1 parent 5a18478 commit 259e57d
Show file tree
Hide file tree
Showing 25 changed files with 899 additions and 129 deletions.
Binary file added docs/forum-test-0.1.0.tgz
Binary file not shown.
278 changes: 149 additions & 129 deletions docs/index.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions sources/forum-test/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.helmignore
docker-compose.yml
rancher-compose.yml
6 changes: 6 additions & 0 deletions sources/forum-test/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: postfix
repository: https://eea.github.io/helm-charts
version: 0.1.0
digest: sha256:a8dff36907f7b6bdf393a28e3a6deb368e995f49254992906c23945744ce42ba
generated: "2023-10-18T15:54:06.675054959+02:00"
25 changes: 25 additions & 0 deletions sources/forum-test/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v2
name: forum-test
description: Forum Interest Groups and projects
icon: https://raw.githubusercontent.com/eea/helm-charts/main/sources/forum-test/logo_eionet.png

type: application

keywords:
- Eionet
- Groupware

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# Version for the main container
appVersion: "forum-test-22.09.06"

# Remember to do helm dep up .
dependencies:
- name: postfix
version: 0.1.0
repository: https://eea.github.io/helm-charts
condition: postfix.enabled
13 changes: 13 additions & 0 deletions sources/forum-test/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Forum archives

This chart is configured for production. Must run in its own namespace.

## Releases

<dl>

<dt>Version 0.1.0</dt>
<dd>Initial version.</dd>

</dl>

Binary file added sources/forum-test/charts/postfix-0.1.0.tgz
Binary file not shown.
Binary file added sources/forum-test/logo_eionet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions sources/forum-test/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# NOTES

1. Get the application URL by running these commands:

{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "appl.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "appl.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "appl.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "appl.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
{{- end }}
62 changes: 62 additions & 0 deletions sources/forum-test/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "appl.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "appl.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "appl.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "appl.labels" -}}
helm.sh/chart: {{ include "appl.chart" . }}
{{ include "appl.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "appl.selectorLabels" -}}
app.kubernetes.io/name: {{ include "appl.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "appl.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "appl.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
16 changes: 16 additions & 0 deletions sources/forum-test/templates/blobstorage-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
{{- include "appl.labels" . | nindent 4 }}
component: blobstorage
name: {{ .Release.Name }}-blobstorage
annotations:
"helm.sh/resource-policy": keep

spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 400Gi
99 changes: 99 additions & 0 deletions sources/forum-test/templates/cron-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "appl.fullname" . }}-cron
labels:
{{- include "appl.labels" . | nindent 4 }}
component: cron
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "appl.selectorLabels" . | nindent 6 }}
component: cron
template:
metadata:
labels:
{{- include "appl.selectorLabels" . | nindent 8 }}
component: cron
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "appl.serviceAccountName" . }}
containers:
- name: {{ .Release.Name }}-cron
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
stdin: true
tty: true
env:
- name: CRONTAB
value: 'True'
- name: ERROR_FROM_EMAIL
value: "{{ .Values.errorFromEmail }}"
- name: GOOGLE_AUTH_CLIENT_ID
value: "{{ .Values.googleAuthClientId }}"
- name: GOOGLE_AUTH_CLIENT_SECRET
value: "{{ .Values.googleAuthClientSecret }}"
- name: HOST_NAME
value: {{ .Values.serverName }}
- name: SENTRY_DSN
value: "{{ .Values.sentryDsn }}"
- name: reCAPTCHA_PRIVATE_KEY
value: "{{ .Values.recaptchaPrivateKey }}"
- name: reCAPTCHA_PUBLIC_KEY
value: "{{ .Values.recaptchaPublicKey }}"
- name: TZ
value: "{{ .Values.timezone }}"
resources:
{{- toYaml .Values.cron.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.cron.securityContext | nindent 12 }}
volumeMounts:
- mountPath: /var/local/groupware/var/ldapdump
name: {{ .Release.Name }}-ldapdump
- mountPath: /var/local/groupware/var/naaya-mail-queue
name: {{ .Release.Name }}-mailqueue
- mountPath: /tmp
name: {{ .Release.Name }}-tmp
- mountPath: /var/local/groupware/var/zeoserver/blobs
name: {{ .Release.Name }}-blobstorage
- mountPath: /var/local/groupware/var/zeoserver/filestorage
name: {{ .Release.Name }}-filestorage
- mountPath: /var/local/groupware/var/zeoserver/repozo
name: {{ .Release.Name }}-repozo

{{- with .Values.cron.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.cron.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.cron.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Always

volumes:
- name: {{ .Release.Name }}-ldapdump
persistentVolumeClaim:
claimName: eionet-ldapdump
- name: {{ .Release.Name }}-mailqueue
persistentVolumeClaim:
claimName: {{ .Release.Name }}-mailqueue
- name: {{ .Release.Name }}-tmp
persistentVolumeClaim:
claimName: {{ .Release.Name }}-tmp
- name: {{ .Release.Name }}-blobstorage
persistentVolumeClaim:
claimName: {{ .Release.Name }}-blobstorage
- name: {{ .Release.Name }}-repozo
persistentVolumeClaim:
claimName: {{ .Release.Name }}-repozo
- name: {{ .Release.Name }}-filestorage
persistentVolumeClaim:
claimName: {{ .Release.Name }}-filestorage
116 changes: 116 additions & 0 deletions sources/forum-test/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "appl.fullname" . }}
labels:
{{- include "appl.labels" . | nindent 4 }}
component: worker
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "appl.selectorLabels" . | nindent 6 }}
component: worker
template:
metadata:
labels:
{{- include "appl.selectorLabels" . | nindent 8 }}
component: worker
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "appl.serviceAccountName" . }}
containers:
- name: {{ .Release.Name }}-worker
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
ports:
- containerPort: 80
protocol: TCP
name: http
env:
- name: DEBUG_MODE
value: "{{ .Values.debugMode }}"
- name: ERROR_FROM_EMAIL
value: {{ .Values.errorFromEmail }}
- name: GOOGLE_AUTH_CLIENT_ID
value: {{ .Values.googleAuthClientId }}
- name: GOOGLE_AUTH_CLIENT_SECRET
value: {{ .Values.googleAuthClientSecret }}
- name: HOST_NAME
value: {{ .Values.serverName }}
- name: SENTRY_DSN
value: {{ .Values.sentryDsn }}
- name: reCAPTCHA_PRIVATE_KEY
value: "{{ .Values.recaptchaPrivateKey }}"
- name: reCAPTCHA_PUBLIC_KEY
value: "{{ .Values.recaptchaPublicKey }}"
- name: TZ
value: "{{ .Values.timezone }}"
resources:
{{- toYaml .Values.resources | nindent 10 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
- mountPath: /var/local/groupware/var/ldapdump
name: {{ .Release.Name }}-ldapdump
- mountPath: /var/local/groupware/var/naaya-mail-queue
name: {{ .Release.Name }}-mailqueue
- mountPath: /tmp
name: {{ .Release.Name }}-tmp
- mountPath: /var/local/groupware/var/instance/import
name: groupware-zexp-files
- mountPath: /var/local/groupware/var/zeoserver/blobs
name: {{ .Release.Name }}-blobstorage

# Restart if unresponsive for 30 seconds 3 times
livenessProbe:
httpGet:
path: /@@health_check
port: http
timeoutSeconds: 30
initialDelaySeconds: 15
failureThreshold: 3
periodSeconds: 30

# Wait up to 5 minutes to start
startupProbe:
httpGet:
path: /@@health_check
port: http
timeoutSeconds: 3
failureThreshold: 30
periodSeconds: 10

{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
restartPolicy: Always

volumes:
- name: {{ .Release.Name }}-ldapdump
persistentVolumeClaim:
claimName: eionet-ldapdump
- name: {{ .Release.Name }}-mailqueue
persistentVolumeClaim:
claimName: {{ .Release.Name }}-mailqueue
- name: {{ .Release.Name }}-tmp
persistentVolumeClaim:
claimName: {{ .Release.Name }}-tmp
- name: groupware-zexp-files
persistentVolumeClaim:
claimName: groupware-zexp-files
- name: {{ .Release.Name }}-blobstorage
persistentVolumeClaim:
claimName: {{ .Release.Name }}-blobstorage

16 changes: 16 additions & 0 deletions sources/forum-test/templates/eionet-ldapdump-pvc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
{{- include "appl.labels" . | nindent 4 }}
component: ldapdump
name: eionet-ldapdump
annotations:
"helm.sh/resource-policy": keep

spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
Loading

0 comments on commit 259e57d

Please sign in to comment.