diff --git a/charts/mlflow/Chart.lock b/charts/mlflow/Chart.lock index 28a94fa..3ae93ea 100644 --- a/charts/mlflow/Chart.lock +++ b/charts/mlflow/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: minio repository: oci://registry-1.docker.io/bitnamicharts - version: 14.7.4 + version: 14.8.1 - name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 15.5.27 + version: 16.1.0 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.22.0 -digest: sha256:804e5af1674d9c10899e5d5c533b064ad574b4a668973440b8e537b1bdb7c080 -generated: "2024-08-31T00:15:50.512773819Z" + version: 2.26.0 +digest: sha256:b497abde94fae1a937497e9255b9dd33f6f0201f7ed14a62fda1a91d44f91a88 +generated: "2024-10-31T14:40:55.653516165Z" diff --git a/charts/mlflow/Chart.yaml b/charts/mlflow/Chart.yaml index 31f9adc..3ba7604 100644 --- a/charts/mlflow/Chart.yaml +++ b/charts/mlflow/Chart.yaml @@ -2,14 +2,14 @@ annotations: category: MachineLearning images: | - name: git - image: docker.io/bitnami/git:2.46.0-debian-12-r1 + image: docker.io/bitnami/git:2.47.0-debian-12-r1 - name: mlflow - image: docker.io/bitnami/mlflow:2.16.0-debian-12-r0 + image: docker.io/bitnami/mlflow:2.17.2-debian-12-r0 - name: os-shell - image: docker.io/bitnami/os-shell:12-debian-12-r28 + image: docker.io/bitnami/os-shell:12-debian-12-r32 licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.16.0 +appVersion: 2.17.2 dependencies: - condition: minio.enabled name: minio @@ -18,7 +18,7 @@ dependencies: - condition: postgresql.enabled name: postgresql repository: oci://registry-1.docker.io/bitnamicharts - version: 15.x.x + version: 16.x.x - name: common repository: oci://registry-1.docker.io/bitnamicharts tags: @@ -43,4 +43,4 @@ sources: - https://github.com/bitnami/charts/tree/main/bitnami/mlflow - https://github.com/bitnami/containers/tree/main/bitnami/mlflow - https://github.com/mlflow/mlflow -version: 1.5.0 +version: 2.1.0 diff --git a/charts/mlflow/README.md b/charts/mlflow/README.md index 7371af6..7d4852a 100644 --- a/charts/mlflow/README.md +++ b/charts/mlflow/README.md @@ -95,6 +95,7 @@ The command deploys mlflow on the Kubernetes cluster in the default configuratio | ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | | `tracking.enabled` | Enable Tracking server | `true` | | `tracking.replicaCount` | Number of mlflow replicas to deploy | `1` | +| `tracking.host` | mlflow tracking listening host. Set to "[::]" to use ipv6. | `0.0.0.0` | | `tracking.containerPorts.http` | mlflow HTTP container port | `5000` | | `tracking.livenessProbe.enabled` | Enable livenessProbe on mlflow containers | `true` | | `tracking.livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `5` | @@ -130,7 +131,7 @@ The command deploys mlflow on the Kubernetes cluster in the default configuratio | `tracking.containerSecurityContext.runAsGroup` | Set containers' Security Context runAsGroup | `1001` | | `tracking.containerSecurityContext.privileged` | Set containers' Security Context privileged | `false` | | `tracking.containerSecurityContext.runAsNonRoot` | Set containers' Security Context runAsNonRoot | `true` | -| `tracking.containerSecurityContext.readOnlyRootFilesystem` | Set containers' Security Context runAsNonRoot | `true` | +| `tracking.containerSecurityContext.readOnlyRootFilesystem` | Set containers' Security Context readOnlyRootFilesystem | `true` | | `tracking.containerSecurityContext.allowPrivilegeEscalation` | Set container's privilege escalation | `false` | | `tracking.containerSecurityContext.capabilities.drop` | Set container's Security Context runAsNonRoot | `["ALL"]` | | `tracking.containerSecurityContext.seccompProfile.type` | Set container's Security Context seccomp profile | `RuntimeDefault` | @@ -497,6 +498,10 @@ Find more information about how to deal with common errors related to Bitnami's ## Upgrading +### To 2.0.0 + +This major updates the PostgreSQL subchart to its newest major, 16.0.0, which uses PostgreSQL 17.x. Follow the [official instructions](https://www.postgresql.org/docs/17/upgrading.html) to upgrade to 17.x. + ### To 1.0.0 This major bump changes the following security defaults: diff --git a/charts/mlflow/charts/common/Chart.yaml b/charts/mlflow/charts/common/Chart.yaml index 0c8fdb5..0d437c4 100644 --- a/charts/mlflow/charts/common/Chart.yaml +++ b/charts/mlflow/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.22.0 +appVersion: 2.26.0 description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself. home: https://bitnami.com @@ -20,4 +20,4 @@ name: common sources: - https://github.com/bitnami/charts/tree/main/bitnami/common type: library -version: 2.22.0 +version: 2.26.0 diff --git a/charts/mlflow/charts/common/templates/_affinities.tpl b/charts/mlflow/charts/common/templates/_affinities.tpl index c2d2907..d387dbe 100644 --- a/charts/mlflow/charts/common/templates/_affinities.tpl +++ b/charts/mlflow/charts/common/templates/_affinities.tpl @@ -60,13 +60,14 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: @@ -77,6 +78,13 @@ preferredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} weight: 1 {{- range $extraPodAffinityTerms }} @@ -96,13 +104,14 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} @@ -112,6 +121,13 @@ requiredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} {{- range $extraPodAffinityTerms }} - labelSelector: diff --git a/charts/mlflow/charts/common/templates/_compatibility.tpl b/charts/mlflow/charts/common/templates/_compatibility.tpl index eb4061d..a61588d 100644 --- a/charts/mlflow/charts/common/templates/_compatibility.tpl +++ b/charts/mlflow/charts/common/templates/_compatibility.tpl @@ -34,6 +34,10 @@ Usage: {{- end -}} {{- end -}} {{- end -}} +{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}} +{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}} + {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}} +{{- end -}} {{/* Remove fields that are disregarded when running the container in privileged mode */}} {{- if $adaptedContext.privileged -}} {{- $adaptedContext = omit $adaptedContext "capabilities" "seLinuxOptions" -}} diff --git a/charts/mlflow/charts/common/templates/_tplvalues.tpl b/charts/mlflow/charts/common/templates/_tplvalues.tpl index c84d72c..a04f4c1 100644 --- a/charts/mlflow/charts/common/templates/_tplvalues.tpl +++ b/charts/mlflow/charts/common/templates/_tplvalues.tpl @@ -36,3 +36,17 @@ Usage: {{- end -}} {{ $dst | toYaml }} {{- end -}} + +{{/* +Merge a list of values that contains template after rendering them. +Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite +Usage: +{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} +*/}} +{{- define "common.tplvalues.merge-overwrite" -}} +{{- $dst := dict -}} +{{- range .values -}} +{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}} +{{- end -}} +{{ $dst | toYaml }} +{{- end -}} diff --git a/charts/mlflow/charts/common/templates/validations/_cassandra.tpl b/charts/mlflow/charts/common/templates/validations/_cassandra.tpl index 3f41ff8..f8fd213 100644 --- a/charts/mlflow/charts/common/templates/validations/_cassandra.tpl +++ b/charts/mlflow/charts/common/templates/validations/_cassandra.tpl @@ -4,32 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate Cassandra required passwords are not empty. - -Usage: -{{ include "common.validations.values.cassandra.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where Cassandra values are stored, e.g: "cassandra-passwords-secret" - - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.cassandra.passwords" -}} - {{- $existingSecret := include "common.cassandra.values.existingSecret" . -}} - {{- $enabled := include "common.cassandra.values.enabled" . -}} - {{- $dbUserPrefix := include "common.cassandra.values.key.dbUser" . -}} - {{- $valueKeyPassword := printf "%s.password" $dbUserPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "cassandra-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/common/templates/validations/_mongodb.tpl b/charts/mlflow/charts/common/templates/validations/_mongodb.tpl index d4cd38c..e678a6d 100644 --- a/charts/mlflow/charts/common/templates/validations/_mongodb.tpl +++ b/charts/mlflow/charts/common/templates/validations/_mongodb.tpl @@ -4,52 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MongoDB® required passwords are not empty. - -Usage: -{{ include "common.validations.values.mongodb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MongoDB® values are stored, e.g: "mongodb-passwords-secret" - - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mongodb.passwords" -}} - {{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mongodb.values.enabled" . -}} - {{- $authPrefix := include "common.mongodb.values.key.auth" . -}} - {{- $architecture := include "common.mongodb.values.architecture" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyDatabase := printf "%s.database" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}} - {{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}} - - {{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") (eq $authEnabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mongodb-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- $valueDatabase := include "common.utils.getValueFromKey" (dict "key" $valueKeyDatabase "context" .context) }} - {{- if and $valueUsername $valueDatabase -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mongodb-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replicaset") -}} - {{- $requiredReplicaSetKey := dict "valueKey" $valueKeyReplicaSetKey "secret" .secret "field" "mongodb-replica-set-key" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicaSetKey -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/common/templates/validations/_mysql.tpl b/charts/mlflow/charts/common/templates/validations/_mysql.tpl index 924812a..fbb65c3 100644 --- a/charts/mlflow/charts/common/templates/validations/_mysql.tpl +++ b/charts/mlflow/charts/common/templates/validations/_mysql.tpl @@ -4,47 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MySQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" - - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mysql.passwords" -}} - {{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mysql.values.enabled" . -}} - {{- $architecture := include "common.mysql.values.architecture" . -}} - {{- $authPrefix := include "common.mysql.values.key.auth" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mysql-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- if not (empty $valueUsername) -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mysql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replication") -}} - {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/common/templates/validations/_postgresql.tpl b/charts/mlflow/charts/common/templates/validations/_postgresql.tpl index 0fa0b14..51d4716 100644 --- a/charts/mlflow/charts/common/templates/validations/_postgresql.tpl +++ b/charts/mlflow/charts/common/templates/validations/_postgresql.tpl @@ -4,35 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate PostgreSQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.postgresql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where postgresql values are stored, e.g: "postgresql-passwords-secret" - - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.postgresql.passwords" -}} - {{- $existingSecret := include "common.postgresql.values.existingSecret" . -}} - {{- $enabled := include "common.postgresql.values.enabled" . -}} - {{- $valueKeyPostgresqlPassword := include "common.postgresql.values.key.postgressPassword" . -}} - {{- $valueKeyPostgresqlReplicationEnabled := include "common.postgresql.values.key.replicationPassword" . -}} - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - {{- $requiredPostgresqlPassword := dict "valueKey" $valueKeyPostgresqlPassword "secret" .secret "field" "postgresql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}} - - {{- $enabledReplication := include "common.postgresql.values.enabled.replication" . -}} - {{- if (eq $enabledReplication "true") -}} - {{- $requiredPostgresqlReplicationPassword := dict "valueKey" $valueKeyPostgresqlReplicationEnabled "secret" .secret "field" "postgresql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to decide whether evaluate global values. diff --git a/charts/mlflow/charts/common/templates/validations/_redis.tpl b/charts/mlflow/charts/common/templates/validations/_redis.tpl index f477825..9fedfef 100644 --- a/charts/mlflow/charts/common/templates/validations/_redis.tpl +++ b/charts/mlflow/charts/common/templates/validations/_redis.tpl @@ -5,39 +5,6 @@ SPDX-License-Identifier: APACHE-2.0 {{/* vim: set filetype=mustache: */}} -{{/* -Validate Redis® required passwords are not empty. - -Usage: -{{ include "common.validations.values.redis.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where redis values are stored, e.g: "redis-passwords-secret" - - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.redis.passwords" -}} - {{- $enabled := include "common.redis.values.enabled" . -}} - {{- $valueKeyPrefix := include "common.redis.values.keys.prefix" . -}} - {{- $standarizedVersion := include "common.redis.values.standarized.version" . }} - - {{- $existingSecret := ternary (printf "%s%s" $valueKeyPrefix "auth.existingSecret") (printf "%s%s" $valueKeyPrefix "existingSecret") (eq $standarizedVersion "true") }} - {{- $existingSecretValue := include "common.utils.getValueFromKey" (dict "key" $existingSecret "context" .context) }} - - {{- $valueKeyRedisPassword := ternary (printf "%s%s" $valueKeyPrefix "auth.password") (printf "%s%s" $valueKeyPrefix "password") (eq $standarizedVersion "true") }} - {{- $valueKeyRedisUseAuth := ternary (printf "%s%s" $valueKeyPrefix "auth.enabled") (printf "%s%s" $valueKeyPrefix "usePassword") (eq $standarizedVersion "true") }} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $useAuth := include "common.utils.getValueFromKey" (dict "key" $valueKeyRedisUseAuth "context" .context) -}} - {{- if eq $useAuth "true" -}} - {{- $requiredRedisPassword := dict "valueKey" $valueKeyRedisPassword "secret" .secret "field" "redis-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRedisPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for enabled redis. diff --git a/charts/mlflow/charts/minio/Chart.lock b/charts/mlflow/charts/minio/Chart.lock index 22f2673..1c098fd 100644 --- a/charts/mlflow/charts/minio/Chart.lock +++ b/charts/mlflow/charts/minio/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.22.0 -digest: sha256:a8fb2fc887ead658a89598a48acde5324196fbc0509503a3eaed50a710fbfe74 -generated: "2024-08-17T13:54:27.813582033Z" + version: 2.26.0 +digest: sha256:5ff7837915aef0067bd32271ee2b10c990774c16c4b6fe0a7c5eb6e53530ce08 +generated: "2024-10-31T09:35:39.451559083Z" diff --git a/charts/mlflow/charts/minio/Chart.yaml b/charts/mlflow/charts/minio/Chart.yaml index b24144f..6d3554a 100644 --- a/charts/mlflow/charts/minio/Chart.yaml +++ b/charts/mlflow/charts/minio/Chart.yaml @@ -2,14 +2,14 @@ annotations: category: Infrastructure images: | - name: minio - image: docker.io/bitnami/minio:2024.8.29-debian-12-r0 + image: docker.io/bitnami/minio:2024.10.29-debian-12-r0 - name: minio-client - image: docker.io/bitnami/minio-client:2024.8.26-debian-12-r0 + image: docker.io/bitnami/minio-client:2024.10.29-debian-12-r0 - name: os-shell - image: docker.io/bitnami/os-shell:12-debian-12-r28 + image: docker.io/bitnami/os-shell:12-debian-12-r32 licenses: Apache-2.0 apiVersion: v2 -appVersion: 2024.8.29 +appVersion: 2024.10.29 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts @@ -33,4 +33,4 @@ maintainers: name: minio sources: - https://github.com/bitnami/charts/tree/main/bitnami/minio -version: 14.7.4 +version: 14.8.1 diff --git a/charts/mlflow/charts/minio/README.md b/charts/mlflow/charts/minio/README.md index fc7e47b..1c54d07 100644 --- a/charts/mlflow/charts/minio/README.md +++ b/charts/mlflow/charts/minio/README.md @@ -50,7 +50,7 @@ Bitnami charts allow setting resource requests and limits for all containers ins To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcePreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). -### [Rolling VS Immutable tags](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html) +### [Rolling VS Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html) It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. @@ -439,15 +439,16 @@ You can enable this initContainer by setting `volumePermissions.enabled` to `tru ### Persistence parameters -| Name | Description | Value | -| --------------------------- | -------------------------------------------------------------------- | --------------------- | -| `persistence.enabled` | Enable MinIO® data persistence using PVC. If false, use emptyDir | `true` | -| `persistence.storageClass` | PVC Storage Class for MinIO® data volume | `""` | -| `persistence.mountPath` | Data volume mount path | `/bitnami/minio/data` | -| `persistence.accessModes` | PVC Access Modes for MinIO® data volume | `["ReadWriteOnce"]` | -| `persistence.size` | PVC Storage Request for MinIO® data volume | `8Gi` | -| `persistence.annotations` | Annotations for the PVC | `{}` | -| `persistence.existingClaim` | Name of an existing PVC to use (only in `standalone` mode) | `""` | +| Name | Description | Value | +| --------------------------- | -------------------------------------------------------------------------------------- | --------------------- | +| `persistence.enabled` | Enable MinIO® data persistence using PVC. If false, use emptyDir | `true` | +| `persistence.storageClass` | PVC Storage Class for MinIO® data volume | `""` | +| `persistence.mountPath` | Data volume mount path | `/bitnami/minio/data` | +| `persistence.accessModes` | PVC Access Modes for MinIO® data volume | `["ReadWriteOnce"]` | +| `persistence.size` | PVC Storage Request for MinIO® data volume | `8Gi` | +| `persistence.annotations` | Annotations for the PVC | `{}` | +| `persistence.existingClaim` | Name of an existing PVC to use (only in `standalone` mode) | `""` | +| `persistence.selector` | Configure custom selector for existing Persistent Volume. (only in `distributed` mode) | `{}` | ### Volume Permissions parameters @@ -486,6 +487,7 @@ You can enable this initContainer by setting `volumePermissions.enabled` to `tru | Name | Description | Value | | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | | `metrics.prometheusAuthType` | Authentication mode for Prometheus (`jwt` or `public`) | `public` | +| `metrics.enabled` | Enable the export of Prometheus metrics | `false` | | `metrics.serviceMonitor.enabled` | If the operator is installed in your cluster, set to true to create a Service Monitor Entry | `false` | | `metrics.serviceMonitor.namespace` | Namespace which Prometheus is running in | `""` | | `metrics.serviceMonitor.labels` | Extra labels for the ServiceMonitor | `{}` | @@ -603,7 +605,7 @@ This version introduces `bitnami/common`, a [library chart](https://helm.sh/docs #### Useful links -- +- - - diff --git a/charts/mlflow/charts/minio/charts/common/Chart.yaml b/charts/mlflow/charts/minio/charts/common/Chart.yaml index 0c8fdb5..0d437c4 100644 --- a/charts/mlflow/charts/minio/charts/common/Chart.yaml +++ b/charts/mlflow/charts/minio/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.22.0 +appVersion: 2.26.0 description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself. home: https://bitnami.com @@ -20,4 +20,4 @@ name: common sources: - https://github.com/bitnami/charts/tree/main/bitnami/common type: library -version: 2.22.0 +version: 2.26.0 diff --git a/charts/mlflow/charts/minio/charts/common/templates/_affinities.tpl b/charts/mlflow/charts/minio/charts/common/templates/_affinities.tpl index c2d2907..d387dbe 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/_affinities.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/_affinities.tpl @@ -60,13 +60,14 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: @@ -77,6 +78,13 @@ preferredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} weight: 1 {{- range $extraPodAffinityTerms }} @@ -96,13 +104,14 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} @@ -112,6 +121,13 @@ requiredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} {{- range $extraPodAffinityTerms }} - labelSelector: diff --git a/charts/mlflow/charts/minio/charts/common/templates/_compatibility.tpl b/charts/mlflow/charts/minio/charts/common/templates/_compatibility.tpl index eb4061d..a61588d 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/_compatibility.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/_compatibility.tpl @@ -34,6 +34,10 @@ Usage: {{- end -}} {{- end -}} {{- end -}} +{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}} +{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}} + {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}} +{{- end -}} {{/* Remove fields that are disregarded when running the container in privileged mode */}} {{- if $adaptedContext.privileged -}} {{- $adaptedContext = omit $adaptedContext "capabilities" "seLinuxOptions" -}} diff --git a/charts/mlflow/charts/minio/charts/common/templates/_tplvalues.tpl b/charts/mlflow/charts/minio/charts/common/templates/_tplvalues.tpl index c84d72c..a04f4c1 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/_tplvalues.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/_tplvalues.tpl @@ -36,3 +36,17 @@ Usage: {{- end -}} {{ $dst | toYaml }} {{- end -}} + +{{/* +Merge a list of values that contains template after rendering them. +Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite +Usage: +{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} +*/}} +{{- define "common.tplvalues.merge-overwrite" -}} +{{- $dst := dict -}} +{{- range .values -}} +{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}} +{{- end -}} +{{ $dst | toYaml }} +{{- end -}} diff --git a/charts/mlflow/charts/minio/charts/common/templates/validations/_cassandra.tpl b/charts/mlflow/charts/minio/charts/common/templates/validations/_cassandra.tpl index 3f41ff8..f8fd213 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/validations/_cassandra.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/validations/_cassandra.tpl @@ -4,32 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate Cassandra required passwords are not empty. - -Usage: -{{ include "common.validations.values.cassandra.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where Cassandra values are stored, e.g: "cassandra-passwords-secret" - - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.cassandra.passwords" -}} - {{- $existingSecret := include "common.cassandra.values.existingSecret" . -}} - {{- $enabled := include "common.cassandra.values.enabled" . -}} - {{- $dbUserPrefix := include "common.cassandra.values.key.dbUser" . -}} - {{- $valueKeyPassword := printf "%s.password" $dbUserPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "cassandra-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/minio/charts/common/templates/validations/_mongodb.tpl b/charts/mlflow/charts/minio/charts/common/templates/validations/_mongodb.tpl index d4cd38c..e678a6d 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/validations/_mongodb.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/validations/_mongodb.tpl @@ -4,52 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MongoDB® required passwords are not empty. - -Usage: -{{ include "common.validations.values.mongodb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MongoDB® values are stored, e.g: "mongodb-passwords-secret" - - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mongodb.passwords" -}} - {{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mongodb.values.enabled" . -}} - {{- $authPrefix := include "common.mongodb.values.key.auth" . -}} - {{- $architecture := include "common.mongodb.values.architecture" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyDatabase := printf "%s.database" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}} - {{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}} - - {{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") (eq $authEnabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mongodb-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- $valueDatabase := include "common.utils.getValueFromKey" (dict "key" $valueKeyDatabase "context" .context) }} - {{- if and $valueUsername $valueDatabase -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mongodb-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replicaset") -}} - {{- $requiredReplicaSetKey := dict "valueKey" $valueKeyReplicaSetKey "secret" .secret "field" "mongodb-replica-set-key" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicaSetKey -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/minio/charts/common/templates/validations/_mysql.tpl b/charts/mlflow/charts/minio/charts/common/templates/validations/_mysql.tpl index 924812a..fbb65c3 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/validations/_mysql.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/validations/_mysql.tpl @@ -4,47 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MySQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" - - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mysql.passwords" -}} - {{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mysql.values.enabled" . -}} - {{- $architecture := include "common.mysql.values.architecture" . -}} - {{- $authPrefix := include "common.mysql.values.key.auth" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mysql-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- if not (empty $valueUsername) -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mysql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replication") -}} - {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/minio/charts/common/templates/validations/_postgresql.tpl b/charts/mlflow/charts/minio/charts/common/templates/validations/_postgresql.tpl index 0fa0b14..51d4716 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/validations/_postgresql.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/validations/_postgresql.tpl @@ -4,35 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate PostgreSQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.postgresql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where postgresql values are stored, e.g: "postgresql-passwords-secret" - - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.postgresql.passwords" -}} - {{- $existingSecret := include "common.postgresql.values.existingSecret" . -}} - {{- $enabled := include "common.postgresql.values.enabled" . -}} - {{- $valueKeyPostgresqlPassword := include "common.postgresql.values.key.postgressPassword" . -}} - {{- $valueKeyPostgresqlReplicationEnabled := include "common.postgresql.values.key.replicationPassword" . -}} - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - {{- $requiredPostgresqlPassword := dict "valueKey" $valueKeyPostgresqlPassword "secret" .secret "field" "postgresql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}} - - {{- $enabledReplication := include "common.postgresql.values.enabled.replication" . -}} - {{- if (eq $enabledReplication "true") -}} - {{- $requiredPostgresqlReplicationPassword := dict "valueKey" $valueKeyPostgresqlReplicationEnabled "secret" .secret "field" "postgresql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to decide whether evaluate global values. diff --git a/charts/mlflow/charts/minio/charts/common/templates/validations/_redis.tpl b/charts/mlflow/charts/minio/charts/common/templates/validations/_redis.tpl index f477825..9fedfef 100644 --- a/charts/mlflow/charts/minio/charts/common/templates/validations/_redis.tpl +++ b/charts/mlflow/charts/minio/charts/common/templates/validations/_redis.tpl @@ -5,39 +5,6 @@ SPDX-License-Identifier: APACHE-2.0 {{/* vim: set filetype=mustache: */}} -{{/* -Validate Redis® required passwords are not empty. - -Usage: -{{ include "common.validations.values.redis.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where redis values are stored, e.g: "redis-passwords-secret" - - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.redis.passwords" -}} - {{- $enabled := include "common.redis.values.enabled" . -}} - {{- $valueKeyPrefix := include "common.redis.values.keys.prefix" . -}} - {{- $standarizedVersion := include "common.redis.values.standarized.version" . }} - - {{- $existingSecret := ternary (printf "%s%s" $valueKeyPrefix "auth.existingSecret") (printf "%s%s" $valueKeyPrefix "existingSecret") (eq $standarizedVersion "true") }} - {{- $existingSecretValue := include "common.utils.getValueFromKey" (dict "key" $existingSecret "context" .context) }} - - {{- $valueKeyRedisPassword := ternary (printf "%s%s" $valueKeyPrefix "auth.password") (printf "%s%s" $valueKeyPrefix "password") (eq $standarizedVersion "true") }} - {{- $valueKeyRedisUseAuth := ternary (printf "%s%s" $valueKeyPrefix "auth.enabled") (printf "%s%s" $valueKeyPrefix "usePassword") (eq $standarizedVersion "true") }} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $useAuth := include "common.utils.getValueFromKey" (dict "key" $valueKeyRedisUseAuth "context" .context) -}} - {{- if eq $useAuth "true" -}} - {{- $requiredRedisPassword := dict "valueKey" $valueKeyRedisPassword "secret" .secret "field" "redis-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRedisPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for enabled redis. diff --git a/charts/mlflow/charts/minio/templates/_helpers.tpl b/charts/mlflow/charts/minio/templates/_helpers.tpl index 8be22d3..2dc85a9 100644 --- a/charts/mlflow/charts/minio/templates/_helpers.tpl +++ b/charts/mlflow/charts/minio/templates/_helpers.tpl @@ -34,30 +34,14 @@ Return the proper Docker Image Registry Secret Names {{- include "common.images.renderPullSecrets" (dict "images" (list .Values.image .Values.clientImage .Values.volumePermissions.image) "context" $) -}} {{- end -}} -{{/* -Returns the available value for certain key in an existing secret (if it exists), -otherwise it generates a random value. -*/}} -{{- define "getValueFromSecret" }} -{{- $len := (default 16 .Length) | int -}} -{{- $obj := (lookup "v1" "Secret" .Namespace .Name).data -}} -{{- if and $obj (hasKey $obj .Key)}} -{{- index $obj .Key | b64dec -}} -{{- else -}} -{{- randAlphaNum $len -}} -{{- end -}} -{{- end }} - {{/* Get the user to use to access MinIO® */}} {{- define "minio.secret.userValue" -}} -{{- if .Values.auth.rootUser }} - {{- .Values.auth.rootUser -}} -{{- else if (not .Values.auth.forcePassword) }} - {{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "common.names.fullname" .) "Length" 10 "Key" "root-user") -}} -{{- else -}} +{{- if (and (empty .Values.auth.rootUser) .Values.auth.forcePassword) }} {{ required "A root username is required!" .Values.auth.rootUser }} +{{- else -}} + {{- include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "root-user" "providedValues" (list "auth.rootUser") "context" $) -}} {{- end -}} {{- end -}} @@ -65,12 +49,10 @@ Get the user to use to access MinIO® Get the password to use to access MinIO® */}} {{- define "minio.secret.passwordValue" -}} -{{- if .Values.auth.rootPassword }} - {{- .Values.auth.rootPassword -}} -{{- else if (not .Values.auth.forcePassword) }} - {{- include "getValueFromSecret" (dict "Namespace" .Release.Namespace "Name" (include "common.names.fullname" .) "Length" 10 "Key" "root-password") -}} -{{- else -}} +{{- if (and (empty .Values.auth.rootPassword) .Values.auth.forcePassword) }} {{ required "A root password is required!" .Values.auth.rootPassword }} +{{- else -}} + {{- include "common.secrets.passwords.manage" (dict "secret" (include "common.names.fullname" .) "key" "root-password" "providedValues" (list "auth.rootPassword") "context" $) -}} {{- end -}} {{- end -}} @@ -158,6 +140,7 @@ Compile all warnings into a single message, and call fail. {{- $messages := append $messages (include "minio.validateValues.mode" .) -}} {{- $messages := append $messages (include "minio.validateValues.totalDrives" .) -}} {{- $messages := append $messages (include "minio.validateValues.tls" .) -}} +{{- $messages := append $messages (include "minio.validateValues.defaultBuckets" .) -}} {{- $messages := without $messages "" -}} {{- $message := join "\n" $messages -}} @@ -206,6 +189,17 @@ minio: tls.existingSecret, tls.autoGenerated {{- end -}} {{- end -}} +{{/* +Validate values of MinIO® - defaultBuckets does not work in distributed mode +*/}} +{{- define "minio.validateValues.defaultBuckets" -}} +{{- if and (eq .Values.mode "distributed") (not (empty .Values.defaultBuckets)) }} +minio: defaultBuckets + defaultBuckets does not work in distributed mode. + Use a provisioning job instead. +{{- end -}} +{{- end -}} + {{/* Return the secret containing MinIO TLS certificates */}} diff --git a/charts/mlflow/charts/minio/templates/distributed/statefulset.yaml b/charts/mlflow/charts/minio/templates/distributed/statefulset.yaml index 111f4fa..0f8d9e4 100644 --- a/charts/mlflow/charts/minio/templates/distributed/statefulset.yaml +++ b/charts/mlflow/charts/minio/templates/distributed/statefulset.yaml @@ -338,6 +338,9 @@ spec: resources: requests: storage: {{ $.Values.persistence.size | quote }} + {{- if .Values.persistence.selector }} + selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 10 }} + {{- end }} {{- include "common.storage.class" (dict "persistence" $.Values.persistence "global" $.Values.global) | nindent 8 }} {{- end }} {{- else }} @@ -355,6 +358,9 @@ spec: resources: requests: storage: {{ .Values.persistence.size | quote }} + {{- if .Values.persistence.selector }} + selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 10 }} + {{- end }} {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) | nindent 8 }} {{- end }} {{- end }} diff --git a/charts/mlflow/charts/minio/templates/provisioning-job.yaml b/charts/mlflow/charts/minio/templates/provisioning-job.yaml index 719eada..cdc3fef 100644 --- a/charts/mlflow/charts/minio/templates/provisioning-job.yaml +++ b/charts/mlflow/charts/minio/templates/provisioning-job.yaml @@ -79,7 +79,7 @@ spec: command: - /bin/bash - -c - - >- + - |- set -e; echo "Start Minio provisioning"; @@ -143,6 +143,18 @@ spec: mc admin service restart {{ $minioAlias }} --wait --json; + # Adding a sleep to ensure that the check below does not cause + # a race condition. We check for the MinIO port because the + # "mc admin service restart --wait" command is not working as expected + sleep 5; + echo "Waiting for Minio to be available after restart"; + wait-for-port \ + --host={{ include "common.names.fullname" . }} \ + --state=inuse \ + --timeout=120 \ + {{ .Values.service.ports.api | int64 }}; + echo "Minio is available. Executing provisioning commands"; + {{- range $policy := .Values.provisioning.policies }} mc admin policy create {{ $minioAlias }} {{ $policy.name }} /etc/ilm/policy-{{ $policy.name }}.json; {{- end }} diff --git a/charts/mlflow/charts/minio/templates/secrets.yaml b/charts/mlflow/charts/minio/templates/secrets.yaml index c72933b..aed9e97 100644 --- a/charts/mlflow/charts/minio/templates/secrets.yaml +++ b/charts/mlflow/charts/minio/templates/secrets.yaml @@ -15,6 +15,6 @@ metadata: {{- end }} type: Opaque data: - root-user: {{ include "minio.secret.userValue" . | b64enc | quote }} - root-password: {{ include "minio.secret.passwordValue" . | b64enc | quote }} + root-user: {{ include "minio.secret.userValue" . }} + root-password: {{ include "minio.secret.passwordValue" . }} {{- end }} diff --git a/charts/mlflow/charts/minio/templates/servicemonitor.yaml b/charts/mlflow/charts/minio/templates/servicemonitor.yaml index 927a225..1fa14e7 100644 --- a/charts/mlflow/charts/minio/templates/servicemonitor.yaml +++ b/charts/mlflow/charts/minio/templates/servicemonitor.yaml @@ -2,7 +2,7 @@ Copyright Broadcom, Inc. All Rights Reserved. SPDX-License-Identifier: APACHE-2.0 */}} - +{{- /* TODO: On major version upgrade, add .Values.metrics.enabled to that check */}} {{- if .Values.metrics.serviceMonitor.enabled }} {{- $releaseNamespace := default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }} apiVersion: {{ default "monitoring.coreos.com/v1" .Values.metrics.serviceMonitor.apiVersion }} diff --git a/charts/mlflow/charts/minio/values.yaml b/charts/mlflow/charts/minio/values.yaml index 854e54a..25e942c 100644 --- a/charts/mlflow/charts/minio/values.yaml +++ b/charts/mlflow/charts/minio/values.yaml @@ -70,10 +70,9 @@ extraDeploy: [] image: registry: docker.io repository: bitnami/minio - tag: 2024.8.29-debian-12-r0 + tag: 2024.10.29-debian-12-r0 digest: "" ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images ## pullPolicy: IfNotPresent @@ -98,7 +97,7 @@ image: clientImage: registry: docker.io repository: bitnami/minio-client - tag: 2024.8.26-debian-12-r0 + tag: 2024.10.29-debian-12-r0 digest: "" ## @param mode MinIO® server mode (`standalone` or `distributed`) ## ref: https://docs.minio.io/docs/distributed-minio-quickstart-guide @@ -1089,6 +1088,12 @@ persistence: ## @param persistence.existingClaim Name of an existing PVC to use (only in `standalone` mode) ## existingClaim: "" + ## @param persistence.selector Configure custom selector for existing Persistent Volume. (only in `distributed` mode) + ## selector: + ## matchLabels: + ## volume: + ## + selector: {} ## @section Volume Permissions parameters ## Init containers parameters: @@ -1108,7 +1113,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r28 + tag: 12-debian-12-r32 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -1188,6 +1193,9 @@ metrics: ## To allow public access without authentication for prometheus metrics set environment as follows. ## prometheusAuthType: public + ## @param metrics.enabled Enable the export of Prometheus metrics + ## + enabled: false ## Prometheus Operator ServiceMonitor configuration ## serviceMonitor: diff --git a/charts/mlflow/charts/postgresql/Chart.lock b/charts/mlflow/charts/postgresql/Chart.lock index c47b15b..0665aa6 100644 --- a/charts/mlflow/charts/postgresql/Chart.lock +++ b/charts/mlflow/charts/postgresql/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.22.0 -digest: sha256:a8fb2fc887ead658a89598a48acde5324196fbc0509503a3eaed50a710fbfe74 -generated: "2024-08-16T13:43:46.077600896Z" + version: 2.26.0 +digest: sha256:5ff7837915aef0067bd32271ee2b10c990774c16c4b6fe0a7c5eb6e53530ce08 +generated: "2024-10-16T12:20:00.574957406Z" diff --git a/charts/mlflow/charts/postgresql/Chart.yaml b/charts/mlflow/charts/postgresql/Chart.yaml index 46d70e0..8985473 100644 --- a/charts/mlflow/charts/postgresql/Chart.yaml +++ b/charts/mlflow/charts/postgresql/Chart.yaml @@ -2,14 +2,14 @@ annotations: category: Database images: | - name: os-shell - image: docker.io/bitnami/os-shell:12-debian-12-r28 + image: docker.io/bitnami/os-shell:12-debian-12-r31 - name: postgres-exporter - image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r40 + image: docker.io/bitnami/postgres-exporter:0.15.0-debian-12-r44 - name: postgresql - image: docker.io/bitnami/postgresql:16.4.0-debian-12-r5 + image: docker.io/bitnami/postgresql:17.0.0-debian-12-r9 licenses: Apache-2.0 apiVersion: v2 -appVersion: 16.4.0 +appVersion: 17.0.0 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts @@ -34,4 +34,4 @@ maintainers: name: postgresql sources: - https://github.com/bitnami/charts/tree/main/bitnami/postgresql -version: 15.5.27 +version: 16.1.0 diff --git a/charts/mlflow/charts/postgresql/README.md b/charts/mlflow/charts/postgresql/README.md index 56352af..a1f5e86 100644 --- a/charts/mlflow/charts/postgresql/README.md +++ b/charts/mlflow/charts/postgresql/README.md @@ -52,7 +52,7 @@ Bitnami charts allow setting resource requests and limits for all containers ins To make this process easier, the chart contains the `resourcesPreset` values, which automatically sets the `resources` section according to different presets. Check these presets in [the bitnami/common chart](https://github.com/bitnami/charts/blob/main/bitnami/common/templates/_resources.tpl#L15). However, in production workloads using `resourcePreset` is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the [official Kubernetes documentation](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/). -### [Rolling VS Immutable tags](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-understand-rolling-tags-containers-index.html) +### [Rolling VS Immutable tags](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-understand-rolling-tags-containers-index.html) It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image. @@ -231,7 +231,7 @@ These are the steps you will usually follow to back up and restore your PostgreS - Use Velero to restore the backed-up PVs on the destination cluster. - Create a new deployment on the destination cluster with the same chart, deployment name, credentials and other parameters as the original. This new deployment will use the restored PVs and hence the original data. -Refer to our detailed [tutorial on backing up and restoring PostgreSQL deployments on Kubernetes](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-migrate-data-tac-velero-index.html) for more information. +Refer to our detailed [tutorial on backing up and restoring PostgreSQL deployments on Kubernetes](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-migrate-data-tac-velero-index.html) for more information. ### NetworkPolicy @@ -299,6 +299,7 @@ If you already have data in it, you will fail to sync to standby nodes for all c | `kubeVersion` | Override Kubernetes version | `""` | | `nameOverride` | String to partially override common.names.fullname template (will maintain the release name) | `""` | | `fullnameOverride` | String to fully override common.names.fullname template | `""` | +| `namespaceOverride` | String to fully override common.names.namespace | `""` | | `clusterDomain` | Kubernetes Cluster Domain | `cluster.local` | | `extraDeploy` | Array of extra objects to deploy with the release (evaluated as a template) | `[]` | | `commonLabels` | Add labels to all the deployed resources | `{}` | @@ -910,7 +911,7 @@ postgresql 08:10:14.72 INFO ==> ** Starting PostgreSQL ** #### Useful links -- [Bitnami Tutorial](https://docs.vmware.com/en/VMware-Tanzu-Application-Catalog/services/tutorials/GUID-resolve-helm2-helm3-post-migration-issues-index.html) +- [Bitnami Tutorial](https://techdocs.broadcom.com/us/en/vmware-tanzu/application-catalog/tanzu-application-catalog/services/tac-doc/apps-tutorials-resolve-helm2-helm3-post-migration-issues-index.html) - [Helm docs](https://helm.sh/docs/topics/v2_v3_migration) - [Helm Blog](https://helm.sh/blog/migrate-from-helm-v2-to-helm-v3) diff --git a/charts/mlflow/charts/postgresql/charts/common/Chart.yaml b/charts/mlflow/charts/postgresql/charts/common/Chart.yaml index 0c8fdb5..0d437c4 100644 --- a/charts/mlflow/charts/postgresql/charts/common/Chart.yaml +++ b/charts/mlflow/charts/postgresql/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.22.0 +appVersion: 2.26.0 description: A Library Helm Chart for grouping common logic between bitnami charts. This chart is not deployable by itself. home: https://bitnami.com @@ -20,4 +20,4 @@ name: common sources: - https://github.com/bitnami/charts/tree/main/bitnami/common type: library -version: 2.22.0 +version: 2.26.0 diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/_affinities.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/_affinities.tpl index c2d2907..d387dbe 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/_affinities.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/_affinities.tpl @@ -60,13 +60,14 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: @@ -77,6 +78,13 @@ preferredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} weight: 1 {{- range $extraPodAffinityTerms }} @@ -96,13 +104,14 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "extraPodAffinityTerms" .Values.extraPodAffinityTerms "extraNamespaces" (list "namespace1" "namespace2") "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} {{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} {{- $extraPodAffinityTerms := default (list) .extraPodAffinityTerms -}} +{{- $extraNamespaces := default (list) .extraNamespaces -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} @@ -112,6 +121,13 @@ requiredDuringSchedulingIgnoredDuringExecution: {{- range $key, $value := $extraMatchLabels }} {{ $key }}: {{ $value | quote }} {{- end }} + {{- if $extraNamespaces }} + namespaces: + - {{ .context.Release.Namespace }} + {{- with $extraNamespaces }} + {{ include "common.tplvalues.render" (dict "value" . "context" $) | nindent 8 }} + {{- end }} + {{- end }} topologyKey: {{ include "common.affinities.topologyKey" (dict "topologyKey" .topologyKey) }} {{- range $extraPodAffinityTerms }} - labelSelector: diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/_compatibility.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/_compatibility.tpl index eb4061d..a61588d 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/_compatibility.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/_compatibility.tpl @@ -34,6 +34,10 @@ Usage: {{- end -}} {{- end -}} {{- end -}} +{{/* Remove empty seLinuxOptions object if global.compatibility.omitEmptySeLinuxOptions is set to true */}} +{{- if and (((.context.Values.global).compatibility).omitEmptySeLinuxOptions) (not .secContext.seLinuxOptions) -}} + {{- $adaptedContext = omit $adaptedContext "seLinuxOptions" -}} +{{- end -}} {{/* Remove fields that are disregarded when running the container in privileged mode */}} {{- if $adaptedContext.privileged -}} {{- $adaptedContext = omit $adaptedContext "capabilities" "seLinuxOptions" -}} diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/_tplvalues.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/_tplvalues.tpl index c84d72c..a04f4c1 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/_tplvalues.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/_tplvalues.tpl @@ -36,3 +36,17 @@ Usage: {{- end -}} {{ $dst | toYaml }} {{- end -}} + +{{/* +Merge a list of values that contains template after rendering them. +Merge precedence is consistent with https://masterminds.github.io/sprig/dicts.html#mergeoverwrite-mustmergeoverwrite +Usage: +{{ include "common.tplvalues.merge-overwrite" ( dict "values" (list .Values.path.to.the.Value1 .Values.path.to.the.Value2) "context" $ ) }} +*/}} +{{- define "common.tplvalues.merge-overwrite" -}} +{{- $dst := dict -}} +{{- range .values -}} +{{- $dst = include "common.tplvalues.render" (dict "value" . "context" $.context "scope" $.scope) | fromYaml | mergeOverwrite $dst -}} +{{- end -}} +{{ $dst | toYaml }} +{{- end -}} diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_cassandra.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_cassandra.tpl index 3f41ff8..f8fd213 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_cassandra.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_cassandra.tpl @@ -4,32 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate Cassandra required passwords are not empty. - -Usage: -{{ include "common.validations.values.cassandra.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where Cassandra values are stored, e.g: "cassandra-passwords-secret" - - subchart - Boolean - Optional. Whether Cassandra is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.cassandra.passwords" -}} - {{- $existingSecret := include "common.cassandra.values.existingSecret" . -}} - {{- $enabled := include "common.cassandra.values.enabled" . -}} - {{- $dbUserPrefix := include "common.cassandra.values.key.dbUser" . -}} - {{- $valueKeyPassword := printf "%s.password" $dbUserPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "cassandra-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mongodb.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mongodb.tpl index d4cd38c..e678a6d 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mongodb.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mongodb.tpl @@ -4,52 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MongoDB® required passwords are not empty. - -Usage: -{{ include "common.validations.values.mongodb.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MongoDB® values are stored, e.g: "mongodb-passwords-secret" - - subchart - Boolean - Optional. Whether MongoDB® is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mongodb.passwords" -}} - {{- $existingSecret := include "common.mongodb.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mongodb.values.enabled" . -}} - {{- $authPrefix := include "common.mongodb.values.key.auth" . -}} - {{- $architecture := include "common.mongodb.values.architecture" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyDatabase := printf "%s.database" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicaSetKey := printf "%s.replicaSetKey" $authPrefix -}} - {{- $valueKeyAuthEnabled := printf "%s.enabled" $authPrefix -}} - - {{- $authEnabled := include "common.utils.getValueFromKey" (dict "key" $valueKeyAuthEnabled "context" .context) -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") (eq $authEnabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mongodb-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- $valueDatabase := include "common.utils.getValueFromKey" (dict "key" $valueKeyDatabase "context" .context) }} - {{- if and $valueUsername $valueDatabase -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mongodb-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replicaset") -}} - {{- $requiredReplicaSetKey := dict "valueKey" $valueKeyReplicaSetKey "secret" .secret "field" "mongodb-replica-set-key" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicaSetKey -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mysql.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mysql.tpl index 924812a..fbb65c3 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mysql.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_mysql.tpl @@ -4,47 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate MySQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.mysql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where MySQL values are stored, e.g: "mysql-passwords-secret" - - subchart - Boolean - Optional. Whether MySQL is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.mysql.passwords" -}} - {{- $existingSecret := include "common.mysql.values.auth.existingSecret" . -}} - {{- $enabled := include "common.mysql.values.enabled" . -}} - {{- $architecture := include "common.mysql.values.architecture" . -}} - {{- $authPrefix := include "common.mysql.values.key.auth" . -}} - {{- $valueKeyRootPassword := printf "%s.rootPassword" $authPrefix -}} - {{- $valueKeyUsername := printf "%s.username" $authPrefix -}} - {{- $valueKeyPassword := printf "%s.password" $authPrefix -}} - {{- $valueKeyReplicationPassword := printf "%s.replicationPassword" $authPrefix -}} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $requiredRootPassword := dict "valueKey" $valueKeyRootPassword "secret" .secret "field" "mysql-root-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRootPassword -}} - - {{- $valueUsername := include "common.utils.getValueFromKey" (dict "key" $valueKeyUsername "context" .context) }} - {{- if not (empty $valueUsername) -}} - {{- $requiredPassword := dict "valueKey" $valueKeyPassword "secret" .secret "field" "mysql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPassword -}} - {{- end -}} - - {{- if (eq $architecture "replication") -}} - {{- $requiredReplicationPassword := dict "valueKey" $valueKeyReplicationPassword "secret" .secret "field" "mysql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for existingSecret. diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_postgresql.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_postgresql.tpl index 0fa0b14..51d4716 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_postgresql.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_postgresql.tpl @@ -4,35 +4,6 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} -{{/* -Validate PostgreSQL required passwords are not empty. - -Usage: -{{ include "common.validations.values.postgresql.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where postgresql values are stored, e.g: "postgresql-passwords-secret" - - subchart - Boolean - Optional. Whether postgresql is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.postgresql.passwords" -}} - {{- $existingSecret := include "common.postgresql.values.existingSecret" . -}} - {{- $enabled := include "common.postgresql.values.enabled" . -}} - {{- $valueKeyPostgresqlPassword := include "common.postgresql.values.key.postgressPassword" . -}} - {{- $valueKeyPostgresqlReplicationEnabled := include "common.postgresql.values.key.replicationPassword" . -}} - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - {{- $requiredPostgresqlPassword := dict "valueKey" $valueKeyPostgresqlPassword "secret" .secret "field" "postgresql-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlPassword -}} - - {{- $enabledReplication := include "common.postgresql.values.enabled.replication" . -}} - {{- if (eq $enabledReplication "true") -}} - {{- $requiredPostgresqlReplicationPassword := dict "valueKey" $valueKeyPostgresqlReplicationEnabled "secret" .secret "field" "postgresql-replication-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredPostgresqlReplicationPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to decide whether evaluate global values. diff --git a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_redis.tpl b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_redis.tpl index f477825..9fedfef 100644 --- a/charts/mlflow/charts/postgresql/charts/common/templates/validations/_redis.tpl +++ b/charts/mlflow/charts/postgresql/charts/common/templates/validations/_redis.tpl @@ -5,39 +5,6 @@ SPDX-License-Identifier: APACHE-2.0 {{/* vim: set filetype=mustache: */}} -{{/* -Validate Redis® required passwords are not empty. - -Usage: -{{ include "common.validations.values.redis.passwords" (dict "secret" "secretName" "subchart" false "context" $) }} -Params: - - secret - String - Required. Name of the secret where redis values are stored, e.g: "redis-passwords-secret" - - subchart - Boolean - Optional. Whether redis is used as subchart or not. Default: false -*/}} -{{- define "common.validations.values.redis.passwords" -}} - {{- $enabled := include "common.redis.values.enabled" . -}} - {{- $valueKeyPrefix := include "common.redis.values.keys.prefix" . -}} - {{- $standarizedVersion := include "common.redis.values.standarized.version" . }} - - {{- $existingSecret := ternary (printf "%s%s" $valueKeyPrefix "auth.existingSecret") (printf "%s%s" $valueKeyPrefix "existingSecret") (eq $standarizedVersion "true") }} - {{- $existingSecretValue := include "common.utils.getValueFromKey" (dict "key" $existingSecret "context" .context) }} - - {{- $valueKeyRedisPassword := ternary (printf "%s%s" $valueKeyPrefix "auth.password") (printf "%s%s" $valueKeyPrefix "password") (eq $standarizedVersion "true") }} - {{- $valueKeyRedisUseAuth := ternary (printf "%s%s" $valueKeyPrefix "auth.enabled") (printf "%s%s" $valueKeyPrefix "usePassword") (eq $standarizedVersion "true") }} - - {{- if and (or (not $existingSecret) (eq $existingSecret "\"\"")) (eq $enabled "true") -}} - {{- $requiredPasswords := list -}} - - {{- $useAuth := include "common.utils.getValueFromKey" (dict "key" $valueKeyRedisUseAuth "context" .context) -}} - {{- if eq $useAuth "true" -}} - {{- $requiredRedisPassword := dict "valueKey" $valueKeyRedisPassword "secret" .secret "field" "redis-password" -}} - {{- $requiredPasswords = append $requiredPasswords $requiredRedisPassword -}} - {{- end -}} - - {{- include "common.validations.values.multiple.empty" (dict "required" $requiredPasswords "context" .context) -}} - {{- end -}} -{{- end -}} - {{/* Auxiliary function to get the right value for enabled redis. diff --git a/charts/mlflow/charts/postgresql/templates/NOTES.txt b/charts/mlflow/charts/postgresql/templates/NOTES.txt index fd7a751..4b79be5 100644 --- a/charts/mlflow/charts/postgresql/templates/NOTES.txt +++ b/charts/mlflow/charts/postgresql/templates/NOTES.txt @@ -1,3 +1,4 @@ +{{- $releaseNamespace := include "common.names.namespace" . }} CHART NAME: {{ .Chart.Name }} CHART VERSION: {{ .Chart.Version }} APP VERSION: {{ .Chart.AppVersion }} @@ -12,11 +13,11 @@ The chart has been deployed in diagnostic mode. All probes have been disabled an Get the list of pods by executing: - kubectl get pods --namespace {{ .Release.Namespace }} -l app.kubernetes.io/instance={{ .Release.Name }} + kubectl get pods --namespace {{ $releaseNamespace }} -l app.kubernetes.io/instance={{ .Release.Name }} Access the pod you want to debug by executing - kubectl exec --namespace {{ .Release.Namespace }} -ti -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash + kubectl exec --namespace {{ $releaseNamespace }} -ti -- /opt/bitnami/scripts/postgresql/entrypoint.sh /bin/bash In order to replicate the container startup scripts execute this command: @@ -34,11 +35,11 @@ WARNING: PostgreSQL has been configured without authentication, this is not reco PostgreSQL can be accessed via port {{ include "postgresql.v1.service.port" . }} on the following DNS names from within your cluster: - {{ include "postgresql.v1.primary.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - Read/Write connection + {{ include "postgresql.v1.primary.fullname" . }}.{{ $releaseNamespace }}.svc.cluster.local - Read/Write connection {{- if eq .Values.architecture "replication" }} - {{ include "postgresql.v1.readReplica.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local - Read only connection + {{ include "postgresql.v1.readReplica.fullname" . }}.{{ $releaseNamespace }}.svc.cluster.local - Read only connection {{- end }} @@ -47,29 +48,29 @@ PostgreSQL can be accessed via port {{ include "postgresql.v1.service.port" . }} To get the password for "postgres" run: - export POSTGRES_ADMIN_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.adminPasswordKey" .}}}" | base64 -d) + export POSTGRES_ADMIN_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.adminPasswordKey" .}}}" | base64 -d) {{- end }} To get the password for "{{ $customUser }}" run: - export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.userPasswordKey" .}}}" | base64 -d) + export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{include "postgresql.v1.userPasswordKey" .}}}" | base64 -d) {{- else }} {{- if .Values.auth.enablePostgresUser }} To get the password for "{{ default "postgres" $customUser }}" run: - export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{ ternary "password" (include "postgresql.v1.adminPasswordKey" .) (and (not (empty $customUser)) (ne $customUser "postgres")) }}}" | base64 -d) + export POSTGRES_PASSWORD=$(kubectl get secret --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.secretName" . }} -o jsonpath="{.data.{{ ternary "password" (include "postgresql.v1.adminPasswordKey" .) (and (not (empty $customUser)) (ne $customUser "postgres")) }}}" | base64 -d) {{- end }} {{- end }} To connect to your database run the following command: {{- if $authEnabled }} - kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} --image {{ include "postgresql.v1.image" . }} --env="PGPASSWORD=$POSTGRES_PASSWORD" \ + kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ $releaseNamespace }} --image {{ include "postgresql.v1.image" . }} --env="PGPASSWORD=$POSTGRES_PASSWORD" \ --command -- psql --host {{ include "postgresql.v1.primary.fullname" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }} {{- else }} - kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ .Release.Namespace }} --image {{ include "postgresql.v1.image" . }} \ + kubectl run {{ include "common.names.fullname" . }}-client --rm --tty -i --restart='Never' --namespace {{ $releaseNamespace }} --image {{ include "postgresql.v1.image" . }} \ --command -- psql --host {{ include "postgresql.v1.primary.fullname" . }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }} {{- end }} @@ -79,8 +80,8 @@ To connect to your database from outside the cluster execute the following comma {{- if contains "NodePort" .Values.primary.service.type }} - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "postgresql.v1.primary.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ $releaseNamespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + export NODE_PORT=$(kubectl get --namespace {{ $releaseNamespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "postgresql.v1.primary.fullname" . }}) {{- if $authEnabled }} PGPASSWORD="$POSTGRES_PASSWORD" psql --host $NODE_IP --port $NODE_PORT -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} {{- else }} @@ -89,9 +90,9 @@ To connect to your database from outside the cluster execute the following comma {{- else if contains "LoadBalancer" .Values.primary.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ include "postgresql.v1.primary.fullname" . }}' + Watch the status with: 'kubectl get svc --namespace {{ $releaseNamespace }} -w {{ include "postgresql.v1.primary.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "postgresql.v1.primary.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") + export SERVICE_IP=$(kubectl get svc --namespace {{ $releaseNamespace }} {{ include "postgresql.v1.primary.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}") {{- if $authEnabled }} PGPASSWORD="$POSTGRES_PASSWORD" psql --host $SERVICE_IP --port {{ include "postgresql.v1.service.port" . }} -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} {{- else }} @@ -99,7 +100,7 @@ To connect to your database from outside the cluster execute the following comma {{- end }} {{- else if contains "ClusterIP" .Values.primary.service.type }} - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ include "postgresql.v1.primary.fullname" . }} {{ include "postgresql.v1.service.port" . }}:{{ include "postgresql.v1.service.port" . }} & + kubectl port-forward --namespace {{ $releaseNamespace }} svc/{{ include "postgresql.v1.primary.fullname" . }} {{ include "postgresql.v1.service.port" . }}:{{ include "postgresql.v1.service.port" . }} & {{- if $authEnabled }} PGPASSWORD="$POSTGRES_PASSWORD" psql --host 127.0.0.1 -U {{ default "postgres" $customUser }} -d {{- if include "postgresql.v1.database" . }} {{ include "postgresql.v1.database" . }}{{- else }} postgres{{- end }} -p {{ include "postgresql.v1.service.port" . }} {{- else }} diff --git a/charts/mlflow/charts/postgresql/templates/backup/cronjob.yaml b/charts/mlflow/charts/postgresql/templates/backup/cronjob.yaml index 9689ac0..c5fd9f7 100644 --- a/charts/mlflow/charts/postgresql/templates/backup/cronjob.yaml +++ b/charts/mlflow/charts/postgresql/templates/backup/cronjob.yaml @@ -9,7 +9,7 @@ apiVersion: batch/v1 kind: CronJob metadata: name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pg_dumpall diff --git a/charts/mlflow/charts/postgresql/templates/backup/pvc.yaml b/charts/mlflow/charts/postgresql/templates/backup/pvc.yaml index 84a7c60..674ac3d 100644 --- a/charts/mlflow/charts/postgresql/templates/backup/pvc.yaml +++ b/charts/mlflow/charts/postgresql/templates/backup/pvc.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: {{ include "postgresql.v1.primary.fullname" . }}-pgdumpall - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.backup.cronjob.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pg_dumpall diff --git a/charts/mlflow/charts/postgresql/templates/primary/configmap.yaml b/charts/mlflow/charts/postgresql/templates/primary/configmap.yaml index 48376a1..ad231e5 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-configuration" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary {{- if .Values.commonAnnotations }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/extended-configmap.yaml b/charts/mlflow/charts/postgresql/templates/primary/extended-configmap.yaml index d9644fc..2d228e4 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/extended-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/extended-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-extended-configuration" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary {{- if .Values.commonAnnotations }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/initialization-configmap.yaml b/charts/mlflow/charts/postgresql/templates/primary/initialization-configmap.yaml index 739fe47..450812a 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/initialization-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/initialization-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/metrics-configmap.yaml b/charts/mlflow/charts/postgresql/templates/primary/metrics-configmap.yaml index 9e9e644..9bf889a 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/metrics-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/metrics-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-metrics" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/metrics-svc.yaml b/charts/mlflow/charts/postgresql/templates/primary/metrics-svc.yaml index 581d5fe..2e77c5b 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/metrics-svc.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/metrics-svc.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: Service metadata: name: {{ printf "%s-metrics" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/pdb.yaml b/charts/mlflow/charts/postgresql/templates/primary/pdb.yaml index ca6caca..a03fb20 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/pdb.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/pdb.yaml @@ -8,7 +8,7 @@ apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "postgresql.v1.primary.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/mlflow/charts/postgresql/templates/primary/preinitialization-configmap.yaml b/charts/mlflow/charts/postgresql/templates/primary/preinitialization-configmap.yaml index 65606a4..ae6d188 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/preinitialization-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/preinitialization-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-preinit-scripts" (include "postgresql.v1.primary.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/servicemonitor.yaml b/charts/mlflow/charts/postgresql/templates/primary/servicemonitor.yaml index 22a0ce7..b17d7f5 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/servicemonitor.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/servicemonitor.yaml @@ -8,7 +8,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "postgresql.v1.primary.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + namespace: {{ coalesce .Values.metrics.serviceMonitor.namespace (include "common.names.namespace" .) | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics @@ -42,5 +42,5 @@ spec: {{- end }} namespaceSelector: matchNames: - - {{ .Release.Namespace | quote }} + - {{ include "common.names.namespace" . | quote }} {{- end }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/statefulset.yaml b/charts/mlflow/charts/postgresql/templates/primary/statefulset.yaml index c110f91..433c62d 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/statefulset.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/statefulset.yaml @@ -8,7 +8,7 @@ apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} kind: StatefulSet metadata: name: {{ include "postgresql.v1.primary.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.primary.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary @@ -534,19 +534,18 @@ spec: env: - name: DATA_SOURCE_URI value: {{ printf "127.0.0.1:%d/postgres?sslmode=disable" (int (include "postgresql.v1.service.port" .)) }} - {{- $pwdKey := ternary (include "postgresql.v1.adminPasswordKey" .) (include "postgresql.v1.userPasswordKey" .) (or (eq $customUser "postgres") (empty $customUser)) }} {{- if .Values.auth.usePasswordFiles }} - name: DATA_SOURCE_PASS_FILE - value: {{ printf "/opt/bitnami/postgresql/secrets/%s" $pwdKey }} + value: {{ printf "/opt/bitnami/postgresql/secrets/%s" (include "postgresql.v1.adminPasswordKey" .) }} {{- else }} - name: DATA_SOURCE_PASS valueFrom: secretKeyRef: name: {{ include "postgresql.v1.secretName" . }} - key: {{ $pwdKey }} + key: {{ include "postgresql.v1.adminPasswordKey" . }} {{- end }} - name: DATA_SOURCE_USER - value: {{ default "postgres" $customUser | quote }} + value: "postgres" {{- if .Values.metrics.extraEnvVars }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.extraEnvVars "context" $) | nindent 12 }} {{- end }} diff --git a/charts/mlflow/charts/postgresql/templates/primary/svc-headless.yaml b/charts/mlflow/charts/postgresql/templates/primary/svc-headless.yaml index ba918f4..180cfcb 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/svc-headless.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/svc-headless.yaml @@ -7,7 +7,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "postgresql.v1.primary.svc.headless" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary annotations: diff --git a/charts/mlflow/charts/postgresql/templates/primary/svc.yaml b/charts/mlflow/charts/postgresql/templates/primary/svc.yaml index 62fe7d4..33002d8 100644 --- a/charts/mlflow/charts/postgresql/templates/primary/svc.yaml +++ b/charts/mlflow/charts/postgresql/templates/primary/svc.yaml @@ -7,7 +7,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "postgresql.v1.primary.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary {{- if or .Values.commonAnnotations .Values.primary.service.annotations }} diff --git a/charts/mlflow/charts/postgresql/templates/prometheusrule.yaml b/charts/mlflow/charts/postgresql/templates/prometheusrule.yaml index b6d17ba..0ec8e6a 100644 --- a/charts/mlflow/charts/postgresql/templates/prometheusrule.yaml +++ b/charts/mlflow/charts/postgresql/templates/prometheusrule.yaml @@ -8,7 +8,7 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + namespace: {{ coalesce .Values.metrics.prometheusRule.namespace (include "common.names.namespace" .) | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.prometheusRule.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics diff --git a/charts/mlflow/charts/postgresql/templates/psp.yaml b/charts/mlflow/charts/postgresql/templates/psp.yaml index b522002..41267ec 100644 --- a/charts/mlflow/charts/postgresql/templates/psp.yaml +++ b/charts/mlflow/charts/postgresql/templates/psp.yaml @@ -8,7 +8,7 @@ apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/read/extended-configmap.yaml b/charts/mlflow/charts/postgresql/templates/read/extended-configmap.yaml index d4db2ae..6ffc93c 100644 --- a/charts/mlflow/charts/postgresql/templates/read/extended-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/extended-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-extended-configuration" (include "postgresql.v1.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read {{- if .Values.commonAnnotations }} diff --git a/charts/mlflow/charts/postgresql/templates/read/metrics-configmap.yaml b/charts/mlflow/charts/postgresql/templates/read/metrics-configmap.yaml index ca019c9..a4ed6b7 100644 --- a/charts/mlflow/charts/postgresql/templates/read/metrics-configmap.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/metrics-configmap.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ printf "%s-metrics" (include "postgresql.v1.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/read/metrics-svc.yaml b/charts/mlflow/charts/postgresql/templates/read/metrics-svc.yaml index cdb2647..fccd1b9 100644 --- a/charts/mlflow/charts/postgresql/templates/read/metrics-svc.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/metrics-svc.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: Service metadata: name: {{ printf "%s-metrics" (include "postgresql.v1.readReplica.fullname" .) }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics-read {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} diff --git a/charts/mlflow/charts/postgresql/templates/read/pdb.yaml b/charts/mlflow/charts/postgresql/templates/read/pdb.yaml index 1d25b68..bd2eaad 100644 --- a/charts/mlflow/charts/postgresql/templates/read/pdb.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/pdb.yaml @@ -8,7 +8,7 @@ apiVersion: {{ include "common.capabilities.policy.apiVersion" . }} kind: PodDisruptionBudget metadata: name: {{ include "postgresql.v1.readReplica.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read diff --git a/charts/mlflow/charts/postgresql/templates/read/servicemonitor.yaml b/charts/mlflow/charts/postgresql/templates/read/servicemonitor.yaml index 2b63559..b1536a6 100644 --- a/charts/mlflow/charts/postgresql/templates/read/servicemonitor.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/servicemonitor.yaml @@ -8,7 +8,7 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "postgresql.v1.readReplica.fullname" . }} - namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + namespace: {{ coalesce .Values.metrics.serviceMonitor.namespace (include "common.names.namespace" .) | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics-read @@ -42,5 +42,5 @@ spec: {{- end }} namespaceSelector: matchNames: - - {{ .Release.Namespace | quote }} + - {{ include "common.names.namespace" . | quote }} {{- end }} diff --git a/charts/mlflow/charts/postgresql/templates/read/statefulset.yaml b/charts/mlflow/charts/postgresql/templates/read/statefulset.yaml index 4f537e6..ad3cfa6 100644 --- a/charts/mlflow/charts/postgresql/templates/read/statefulset.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/statefulset.yaml @@ -9,7 +9,7 @@ apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} kind: StatefulSet metadata: name: {{ include "postgresql.v1.readReplica.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.readReplicas.labels .Values.commonLabels ) "context" . ) }} labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read diff --git a/charts/mlflow/charts/postgresql/templates/read/svc-headless.yaml b/charts/mlflow/charts/postgresql/templates/read/svc-headless.yaml index ef44601..15342a3 100644 --- a/charts/mlflow/charts/postgresql/templates/read/svc-headless.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/svc-headless.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "postgresql.v1.readReplica.svc.headless" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read annotations: diff --git a/charts/mlflow/charts/postgresql/templates/read/svc.yaml b/charts/mlflow/charts/postgresql/templates/read/svc.yaml index d230acb..452b875 100644 --- a/charts/mlflow/charts/postgresql/templates/read/svc.yaml +++ b/charts/mlflow/charts/postgresql/templates/read/svc.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "postgresql.v1.readReplica.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read {{- if or .Values.commonAnnotations .Values.readReplicas.service.annotations }} diff --git a/charts/mlflow/charts/postgresql/templates/role.yaml b/charts/mlflow/charts/postgresql/templates/role.yaml index 12cd212..86ce182 100644 --- a/charts/mlflow/charts/postgresql/templates/role.yaml +++ b/charts/mlflow/charts/postgresql/templates/role.yaml @@ -8,7 +8,7 @@ kind: Role apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/rolebinding.yaml b/charts/mlflow/charts/postgresql/templates/rolebinding.yaml index 2ee30a4..58c5ef2 100644 --- a/charts/mlflow/charts/postgresql/templates/rolebinding.yaml +++ b/charts/mlflow/charts/postgresql/templates/rolebinding.yaml @@ -8,7 +8,7 @@ kind: RoleBinding apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -20,5 +20,5 @@ roleRef: subjects: - kind: ServiceAccount name: {{ include "postgresql.v1.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} {{- end }} diff --git a/charts/mlflow/charts/postgresql/templates/secrets.yaml b/charts/mlflow/charts/postgresql/templates/secrets.yaml index 2fcf64c..fa3f67b 100644 --- a/charts/mlflow/charts/postgresql/templates/secrets.yaml +++ b/charts/mlflow/charts/postgresql/templates/secrets.yaml @@ -28,7 +28,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "common.names.fullname" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -56,7 +56,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-postgres - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -78,7 +78,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-custom-user - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/templates/serviceaccount.yaml b/charts/mlflow/charts/postgresql/templates/serviceaccount.yaml index 93efa64..3a0ccf0 100644 --- a/charts/mlflow/charts/postgresql/templates/serviceaccount.yaml +++ b/charts/mlflow/charts/postgresql/templates/serviceaccount.yaml @@ -8,7 +8,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "postgresql.v1.serviceAccountName" . }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }} diff --git a/charts/mlflow/charts/postgresql/templates/tls-secrets.yaml b/charts/mlflow/charts/postgresql/templates/tls-secrets.yaml index 2e992d6..d6be0f3 100644 --- a/charts/mlflow/charts/postgresql/templates/tls-secrets.yaml +++ b/charts/mlflow/charts/postgresql/templates/tls-secrets.yaml @@ -7,7 +7,7 @@ SPDX-License-Identifier: APACHE-2.0 {{- $secretName := printf "%s-crt" (include "common.names.fullname" .) }} {{- $ca := genCA "postgresql-ca" 365 }} {{- $fullname := include "common.names.fullname" . }} -{{- $releaseNamespace := .Release.Namespace }} +{{- $releaseNamespace := include "common.names.namespace" . }} {{- $clusterDomain := .Values.clusterDomain }} {{- $primaryHeadlessServiceName := include "postgresql.v1.primary.svc.headless" . }} {{- $readHeadlessServiceName := include "postgresql.v1.readReplica.svc.headless" . }} @@ -17,7 +17,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ $secretName }} - namespace: {{ .Release.Namespace | quote }} + namespace: {{ include "common.names.namespace" . | quote }} labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/charts/mlflow/charts/postgresql/values.yaml b/charts/mlflow/charts/postgresql/values.yaml index 059dd59..977a2bf 100644 --- a/charts/mlflow/charts/postgresql/values.yaml +++ b/charts/mlflow/charts/postgresql/values.yaml @@ -65,6 +65,9 @@ nameOverride: "" ## @param fullnameOverride String to fully override common.names.fullname template ## fullnameOverride: "" +## @param namespaceOverride String to fully override common.names.namespace +## +namespaceOverride: "" ## @param clusterDomain Kubernetes Cluster Domain ## clusterDomain: cluster.local @@ -107,10 +110,9 @@ diagnosticMode: image: registry: docker.io repository: bitnami/postgresql - tag: 16.4.0-debian-12-r5 + tag: 17.0.0-debian-12-r9 digest: "" ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images ## pullPolicy: IfNotPresent @@ -1446,7 +1448,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r28 + tag: 12-debian-12-r31 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -1555,7 +1557,7 @@ metrics: image: registry: docker.io repository: bitnami/postgres-exporter - tag: 0.15.0-debian-12-r40 + tag: 0.15.0-debian-12-r44 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/charts/mlflow/templates/tracking/deployment.yaml b/charts/mlflow/templates/tracking/deployment.yaml index 8a4b2d7..fc75031 100644 --- a/charts/mlflow/templates/tracking/deployment.yaml +++ b/charts/mlflow/templates/tracking/deployment.yaml @@ -155,7 +155,7 @@ spec: {{ else }} - --serve-artifacts {{- end }} - - --host=0.0.0.0 + - --host={{ .Values.tracking.host }} - --port={{ .Values.tracking.containerPorts.http }} {{- if .Values.tracking.metrics.enabled }} - --expose-prometheus={{ .Values.tracking.persistence.mountPath }}/metrics diff --git a/charts/mlflow/values.yaml b/charts/mlflow/values.yaml index 376532e..5b232fa 100644 --- a/charts/mlflow/values.yaml +++ b/charts/mlflow/values.yaml @@ -87,10 +87,9 @@ diagnosticMode: image: registry: docker.io repository: bitnami/mlflow - tag: 2.16.0-debian-12-r0 + tag: 2.17.2-debian-12-r0 digest: "" ## Specify a imagePullPolicy - ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' ## ref: https://kubernetes.io/docs/concepts/containers/images/#pre-pulled-images ## pullPolicy: IfNotPresent @@ -117,7 +116,7 @@ image: gitImage: registry: docker.io repository: bitnami/git - tag: 2.46.0-debian-12-r1 + tag: 2.47.0-debian-12-r1 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -137,6 +136,9 @@ tracking: ## @param tracking.replicaCount Number of mlflow replicas to deploy ## replicaCount: 1 + ## @param tracking.host mlflow tracking listening host. Set to "[::]" to use ipv6. + ## + host: "0.0.0.0" ## @param tracking.containerPorts.http mlflow HTTP container port ## containerPorts: @@ -233,7 +235,7 @@ tracking: ## @param tracking.containerSecurityContext.runAsGroup Set containers' Security Context runAsGroup ## @param tracking.containerSecurityContext.privileged Set containers' Security Context privileged ## @param tracking.containerSecurityContext.runAsNonRoot Set containers' Security Context runAsNonRoot - ## @param tracking.containerSecurityContext.readOnlyRootFilesystem Set containers' Security Context runAsNonRoot + ## @param tracking.containerSecurityContext.readOnlyRootFilesystem Set containers' Security Context readOnlyRootFilesystem ## @param tracking.containerSecurityContext.allowPrivilegeEscalation Set container's privilege escalation ## @param tracking.containerSecurityContext.capabilities.drop Set container's Security Context runAsNonRoot ## @param tracking.containerSecurityContext.seccompProfile.type Set container's Security Context seccomp profile @@ -1210,7 +1212,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r28 + tag: 12-debian-12-r32 pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. ## Secrets must be manually created in the namespace. @@ -1259,7 +1261,7 @@ waitContainer: image: registry: docker.io repository: bitnami/os-shell - tag: 12-debian-12-r28 + tag: 12-debian-12-r32 digest: "" ## @param waitContainer.image.pullPolicy Init container wait-container image pull policy ##