diff --git a/charts/openproject/Chart.yaml b/charts/openproject/Chart.yaml index 3d87df2..0ef51ee 100644 --- a/charts/openproject/Chart.yaml +++ b/charts/openproject/Chart.yaml @@ -5,7 +5,7 @@ description: "A Helm chart for running OpenProject via Kubernetes" home: "https://www.openproject.org/" icon: "https://www.openproject.org/assets/images/press/openproject-icon-original-color-41055eb6.png" type: "application" -version: "2.0.4" +version: "2.1.0" appVersion: "12" maintainers: - name: OpenProject diff --git a/charts/openproject/templates/secrets.yaml b/charts/openproject/templates/secrets.yaml index 74ece49..8ae840b 100644 --- a/charts/openproject/templates/secrets.yaml +++ b/charts/openproject/templates/secrets.yaml @@ -7,7 +7,7 @@ metadata: {{- include "common.labels.standard" . | nindent 4 }} stringData: {{- if .Values.postgresql.bundled }} - DATABASE_HOST: {{ printf "%s-postgresql.%s.svc.cluster.local" .Release.Name .Release.Namespace | quote }} + DATABASE_HOST: {{ printf "%s-postgresql.%s.svc.%s" .Release.Name .Release.Namespace .Values.clusterDomain | quote }} DATABASE_PORT: "{{ .Values.postgresql.primary.service.ports.postgresql }}" DATABASE_URL: "postgresql://{{ .Values.postgresql.auth.username }}:{{ .Values.postgresql.auth.password }}@{{ include "common.names.dependency.fullname" (dict "chartName" "postgresql" "chartValues" .Values.postgresql "context" $) }}:{{ .Values.postgresql.primary.service.ports.postgresql }}/{{ .Values.postgresql.auth.database }}" {{- else }} diff --git a/charts/openproject/templates/seeder-job.yaml b/charts/openproject/templates/seeder-job.yaml index ea7889e..325d98d 100644 --- a/charts/openproject/templates/seeder-job.yaml +++ b/charts/openproject/templates/seeder-job.yaml @@ -16,7 +16,8 @@ spec: {{- end }} initContainers: - name: check-db-ready - image: postgres:13 + image: "{{ .Values.initdb.image.registry }}/{{ .Values.initdb.image.repository }}:{{ .Values.initdb.image.tag }}" + imagePullPolicy: {{ .Values.initdb.image.imagePullPolicy }} command: [ 'sh', '-c', @@ -25,6 +26,8 @@ spec: envFrom: - secretRef: name: {{ include "common.names.fullname" . }} + resources: + {{- toYaml .Values.initdb.resources | nindent 12 }} containers: - name: seeder image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}{{ if .Values.image.sha256 }}@sha256:{{ .Values.image.sha256 }}{{ else }}:{{ .Values.image.tag }}{{ end }}" diff --git a/charts/openproject/values.yaml b/charts/openproject/values.yaml index f2bb505..684e9d7 100644 --- a/charts/openproject/values.yaml +++ b/charts/openproject/values.yaml @@ -33,6 +33,45 @@ environment: {} # fullnameOverride: "" +## +# Override the cluster domain name used in templating +clusterDomain: "cluster.local" + +## Define settings for wait-for-db init-container +# +initdb: + image: + ## Define docker registry address. + # + registry: "docker.io" + + ## Define repository string. + # + repository: "postgres" + + # Postgres version to use + tag: 13 + + ## Define a imagePullPolicy. + ## + ## Ref.: https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy + ## + ## "IfNotPresent" => The image is pulled only if it is not already present locally. + ## "Always" => Every time the kubelet launches a container, the kubelet queries the container image registry to + ## resolve the name to an image digest. If the kubelet has a container image with that exact digest cached + ## locally, the kubelet uses its cached image; otherwise, the kubelet pulls the image with the resolved + ## digest, and uses that image to launch the container. + ## "Never" => The kubelet does not try fetching the image. If the image is somehow already present locally, the + ## kubelet attempts to start the container; otherwise, startup fails + # + imagePullPolicy: "Always" + + resources: + limits: + memory: "200Mi" + requests: + memory: "200Mi" + ## Define and create Kubernetes Service. ## ## Ref.: https://kubernetes.io/docs/concepts/services-networking/ingress/