diff options
Diffstat (limited to 'helm')
-rw-r--r-- | helm/wekan/README.md | 7 | ||||
-rw-r--r-- | helm/wekan/requirements.yaml | 2 | ||||
-rw-r--r-- | helm/wekan/templates/_helpers.tpl | 2 | ||||
-rw-r--r-- | helm/wekan/templates/deployment.yaml | 6 | ||||
-rw-r--r-- | helm/wekan/templates/ingress.yaml | 2 | ||||
-rw-r--r-- | helm/wekan/templates/route.yaml | 23 | ||||
-rw-r--r-- | helm/wekan/templates/serviceaccount.yaml | 4 | ||||
-rw-r--r-- | helm/wekan/values.yaml | 10 |
8 files changed, 51 insertions, 5 deletions
diff --git a/helm/wekan/README.md b/helm/wekan/README.md index d3af930c..38cb5fed 100644 --- a/helm/wekan/README.md +++ b/helm/wekan/README.md @@ -56,3 +56,10 @@ mongodb-replicaset: This section controls the scale of the MongoDB redundant Replica Set. **replicas:** This is the number of MongoDB instances to include in the set. You can set this to 1 for a single server - this will still allow you to scale-up later with a helm upgrade. + +### Install OCP route +If you use this chart to deploy Wekan on an OCP cluster, you can create route instead of ingress with following command: + +``` bash +$ helm template --set route.enabled=true,ingress.enabled=false values.yaml . | oc apply -f- +``` diff --git a/helm/wekan/requirements.yaml b/helm/wekan/requirements.yaml index e2492a91..d19fc638 100644 --- a/helm/wekan/requirements.yaml +++ b/helm/wekan/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - name: mongodb-replicaset - version: 3.6.x + version: 3.11.x repository: "https://kubernetes-charts.storage.googleapis.com/" condition: mongodb-replicaset.enabled diff --git a/helm/wekan/templates/_helpers.tpl b/helm/wekan/templates/_helpers.tpl index 68f71ef7..7f333301 100644 --- a/helm/wekan/templates/_helpers.tpl +++ b/helm/wekan/templates/_helpers.tpl @@ -75,7 +75,7 @@ else use user-provided URL. {{- if (index .Values "mongodb-replicaset" "enabled") -}} {{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}} {{- $release := .Release.Name -}} -mongodb://{{- range $v := until $count }}{{ $release }}-mongodb-replicaset-{{ $v }}.{{ $release }}-mongodb-replicaset:27017{{ if ne $v (sub $count 1) }},{{- end -}}{{- end -}}?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }} +mongodb://{{ $release }}-mongodb-replicaset:27017/admin?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }} {{- else -}} {{- index .Values "mongodb-replicaset" "url" -}} {{- end -}} diff --git a/helm/wekan/templates/deployment.yaml b/helm/wekan/templates/deployment.yaml index e5bf2018..68dbf75c 100644 --- a/helm/wekan/templates/deployment.yaml +++ b/helm/wekan/templates/deployment.yaml @@ -37,6 +37,12 @@ spec: value: {{ .Values.root_url | default "https://wekan.local" | quote }} - name: MONGO_URL value: "{{ template "mongodb-replicaset.url" . }}" + {{- range $key := .Values.env }} + {{- if .value }} + - name: {{ .name }} + value: {{ .value | quote }} + {{- end }} + {{- end }} livenessProbe: httpGet: path: / diff --git a/helm/wekan/templates/ingress.yaml b/helm/wekan/templates/ingress.yaml index d63c21c3..dd85ef55 100644 --- a/helm/wekan/templates/ingress.yaml +++ b/helm/wekan/templates/ingress.yaml @@ -35,6 +35,6 @@ spec: - path: {{ $ingressPath }} backend: serviceName: {{ $fullName }} - servicePort: http + servicePort: 80 {{- end }} {{- end }} diff --git a/helm/wekan/templates/route.yaml b/helm/wekan/templates/route.yaml new file mode 100644 index 00000000..9a55591d --- /dev/null +++ b/helm/wekan/templates/route.yaml @@ -0,0 +1,23 @@ +{{- if .Values.route.enabled -}} +{{- $fullName := include "wekan.fullname" . -}} +apiVersion: route.openshift.io/v1 +kind: Route +metadata: + annotations: + haproxy.router.openshift.io/timeout: 4m + openshift.io/host.generated: "true" + labels: + app: {{ template "wekan.name" . }} + service: {{ template "wekan.name" . }} + name: {{ template "wekan.name" . }} +spec: + port: + targetPort: http + tls: + termination: edge + to: + kind: Service + name: {{ template "wekan.name" . }} + weight: 100 + wildcardPolicy: None + {{- end }}
\ No newline at end of file diff --git a/helm/wekan/templates/serviceaccount.yaml b/helm/wekan/templates/serviceaccount.yaml index 58696cb6..543e58d4 100644 --- a/helm/wekan/templates/serviceaccount.yaml +++ b/helm/wekan/templates/serviceaccount.yaml @@ -2,6 +2,10 @@ apiVersion: v1 kind: ServiceAccount metadata: +{{- if .Values.serviceAccounts.annotations }} + annotations: +{{ .Values.serviceAccounts.annotations | indent 4}} +{{- end }} labels: app: {{ template "wekan.name" . }} chart: {{ template "wekan.chart" . }} diff --git a/helm/wekan/values.yaml b/helm/wekan/values.yaml index adc2c855..78136af3 100644 --- a/helm/wekan/values.yaml +++ b/helm/wekan/values.yaml @@ -8,6 +8,7 @@ serviceAccounts: create: true name: "" + annotations: "" ## Wekan image configuration ## @@ -29,7 +30,9 @@ credentials: ## Specify additional environmental variables for the Deployment ## -env: {} +env: + - name: "" + value: "" service: type: NodePort @@ -59,7 +62,10 @@ ingress: # hosts: # - wekan-example.local -resources: +route: + enabled: false + +resources: requests: memory: 128Mi cpu: 300m |