diff --git a/assets/argo/argo-cd-5.43.4.tgz b/assets/argo/argo-cd-5.43.4.tgz index 23bc63971..2c0fd10fc 100644 Binary files a/assets/argo/argo-cd-5.43.4.tgz and b/assets/argo/argo-cd-5.43.4.tgz differ diff --git a/assets/argo/argo-cd-5.43.5.tgz b/assets/argo/argo-cd-5.43.5.tgz new file mode 100644 index 000000000..f1beca5cc Binary files /dev/null and b/assets/argo/argo-cd-5.43.5.tgz differ diff --git a/assets/bitnami/cassandra-10.5.0.tgz b/assets/bitnami/cassandra-10.5.0.tgz new file mode 100644 index 000000000..7d21ff5cc Binary files /dev/null and b/assets/bitnami/cassandra-10.5.0.tgz differ diff --git a/assets/bitnami/kafka-25.0.1.tgz b/assets/bitnami/kafka-25.0.1.tgz new file mode 100644 index 000000000..e09c2148f Binary files /dev/null and b/assets/bitnami/kafka-25.0.1.tgz differ diff --git a/assets/bitnami/mariadb-13.1.1.tgz b/assets/bitnami/mariadb-13.1.1.tgz new file mode 100644 index 000000000..1d83ac0f5 Binary files /dev/null and b/assets/bitnami/mariadb-13.1.1.tgz differ diff --git a/assets/bitnami/mysql-9.12.0.tgz b/assets/bitnami/mysql-9.12.0.tgz new file mode 100644 index 000000000..26004b603 Binary files /dev/null and b/assets/bitnami/mysql-9.12.0.tgz differ diff --git a/assets/bitnami/postgresql-12.9.0.tgz b/assets/bitnami/postgresql-12.9.0.tgz new file mode 100644 index 000000000..5e0bd8326 Binary files /dev/null and b/assets/bitnami/postgresql-12.9.0.tgz differ diff --git a/assets/bitnami/redis-17.16.0.tgz b/assets/bitnami/redis-17.16.0.tgz new file mode 100644 index 000000000..784a38021 Binary files /dev/null and b/assets/bitnami/redis-17.16.0.tgz differ diff --git a/assets/bitnami/spark-7.1.5.tgz b/assets/bitnami/spark-7.1.5.tgz new file mode 100644 index 000000000..2882756cd Binary files /dev/null and b/assets/bitnami/spark-7.1.5.tgz differ diff --git a/assets/bitnami/tomcat-10.10.0.tgz b/assets/bitnami/tomcat-10.10.0.tgz new file mode 100644 index 000000000..12278b80b Binary files /dev/null and b/assets/bitnami/tomcat-10.10.0.tgz differ diff --git a/assets/bitnami/wordpress-17.1.2.tgz b/assets/bitnami/wordpress-17.1.2.tgz new file mode 100644 index 000000000..1472074ef Binary files /dev/null and b/assets/bitnami/wordpress-17.1.2.tgz differ diff --git a/assets/bitnami/zookeeper-12.1.0.tgz b/assets/bitnami/zookeeper-12.1.0.tgz new file mode 100644 index 000000000..bc6bf9eb6 Binary files /dev/null and b/assets/bitnami/zookeeper-12.1.0.tgz differ diff --git a/assets/datadog/datadog-3.34.2.tgz b/assets/datadog/datadog-3.34.2.tgz new file mode 100644 index 000000000..8abec1f7a Binary files /dev/null and b/assets/datadog/datadog-3.34.2.tgz differ diff --git a/assets/external-secrets/external-secrets-0.9.4.tgz b/assets/external-secrets/external-secrets-0.9.4.tgz new file mode 100644 index 000000000..5883d9565 Binary files /dev/null and b/assets/external-secrets/external-secrets-0.9.4.tgz differ diff --git a/assets/jenkins/jenkins-4.6.1.tgz b/assets/jenkins/jenkins-4.6.1.tgz new file mode 100644 index 000000000..715950378 Binary files /dev/null and b/assets/jenkins/jenkins-4.6.1.tgz differ diff --git a/assets/kubecost/cost-analyzer-1.105.1.tgz b/assets/kubecost/cost-analyzer-1.105.1.tgz index eacbda7c4..822d5f12b 100644 Binary files a/assets/kubecost/cost-analyzer-1.105.1.tgz and b/assets/kubecost/cost-analyzer-1.105.1.tgz differ diff --git a/assets/kubecost/cost-analyzer-1.105.2.tgz b/assets/kubecost/cost-analyzer-1.105.2.tgz new file mode 100644 index 000000000..d419d7e26 Binary files /dev/null and b/assets/kubecost/cost-analyzer-1.105.2.tgz differ diff --git a/assets/linkerd/linkerd-control-plane-1.12.6.tgz b/assets/linkerd/linkerd-control-plane-1.12.6.tgz index 38170f789..c8904b375 100644 Binary files a/assets/linkerd/linkerd-control-plane-1.12.6.tgz and b/assets/linkerd/linkerd-control-plane-1.12.6.tgz differ diff --git a/assets/linkerd/linkerd-control-plane-1.15.0.tgz b/assets/linkerd/linkerd-control-plane-1.15.0.tgz new file mode 100644 index 000000000..20819fbba Binary files /dev/null and b/assets/linkerd/linkerd-control-plane-1.15.0.tgz differ diff --git a/assets/new-relic/nri-bundle-5.0.26.tgz b/assets/new-relic/nri-bundle-5.0.26.tgz new file mode 100644 index 000000000..75dfb709d Binary files /dev/null and b/assets/new-relic/nri-bundle-5.0.26.tgz differ diff --git a/assets/redpanda/redpanda-5.1.5.tgz b/assets/redpanda/redpanda-5.1.5.tgz new file mode 100644 index 000000000..deba1eeea Binary files /dev/null and b/assets/redpanda/redpanda-5.1.5.tgz differ diff --git a/assets/speedscale/speedscale-operator-1.3.28.tgz b/assets/speedscale/speedscale-operator-1.3.28.tgz new file mode 100644 index 000000000..5086698b9 Binary files /dev/null and b/assets/speedscale/speedscale-operator-1.3.28.tgz differ diff --git a/charts/argo/argo-cd/Chart.yaml b/charts/argo/argo-cd/Chart.yaml index 74df7679f..41aea4bd0 100644 --- a/charts/argo/argo-cd/Chart.yaml +++ b/charts/argo/argo-cd/Chart.yaml @@ -1,7 +1,7 @@ annotations: artifacthub.io/changes: | - - kind: fixed - description: Rename comment of repositoryCredentials to credentialTemplates + - kind: changed + description: Upgrade Argo CD to v2.8.1 artifacthub.io/signKey: | fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc @@ -11,7 +11,7 @@ annotations: catalog.cattle.io/kube-version: '>=1.23.0-0' catalog.cattle.io/release-name: argo-cd apiVersion: v2 -appVersion: v2.8.0 +appVersion: v2.8.1 dependencies: - condition: redis-ha.enabled name: redis-ha @@ -33,4 +33,4 @@ name: argo-cd sources: - https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd - https://github.com/argoproj/argo-cd -version: 5.43.4 +version: 5.43.5 diff --git a/charts/bitnami/cassandra/Chart.lock b/charts/bitnami/cassandra/Chart.lock index badb77665..6d4cb7174 100644 --- a/charts/bitnami/cassandra/Chart.lock +++ b/charts/bitnami/cassandra/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-17T11:58:51.213461818Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T13:54:17.109546+02:00" diff --git a/charts/bitnami/cassandra/Chart.yaml b/charts/bitnami/cassandra/Chart.yaml index c7129f6e1..6382714d6 100644 --- a/charts/bitnami/cassandra/Chart.yaml +++ b/charts/bitnami/cassandra/Chart.yaml @@ -35,4 +35,4 @@ maintainers: name: cassandra sources: - https://github.com/bitnami/charts/tree/main/bitnami/cassandra -version: 10.4.8 +version: 10.5.0 diff --git a/charts/bitnami/cassandra/charts/common/Chart.yaml b/charts/bitnami/cassandra/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/cassandra/charts/common/Chart.yaml +++ b/charts/bitnami/cassandra/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/cassandra/charts/common/README.md b/charts/bitnami/cassandra/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/cassandra/charts/common/README.md +++ b/charts/bitnami/cassandra/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/cassandra/charts/common/templates/_affinities.tpl b/charts/bitnami/cassandra/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/cassandra/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/cassandra/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/cassandra/charts/common/templates/_labels.tpl b/charts/bitnami/cassandra/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/cassandra/charts/common/templates/_labels.tpl +++ b/charts/bitnami/cassandra/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/cassandra/templates/cassandra-secret.yaml b/charts/bitnami/cassandra/templates/cassandra-secret.yaml index a91ebb657..847cad0be 100644 --- a/charts/bitnami/cassandra/templates/cassandra-secret.yaml +++ b/charts/bitnami/cassandra/templates/cassandra-secret.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -27,10 +24,7 @@ kind: Secret metadata: name: {{ printf "%s-tls-pass" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/headless-svc.yaml b/charts/bitnami/cassandra/templates/headless-svc.yaml index 072923167..b494369b8 100644 --- a/charts/bitnami/cassandra/templates/headless-svc.yaml +++ b/charts/bitnami/cassandra/templates/headless-svc.yaml @@ -8,18 +8,10 @@ kind: Service metadata: name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.headless.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.service.headless.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: clusterIP: None @@ -37,4 +29,5 @@ spec: - name: cql port: {{ .Values.service.ports.cql }} targetPort: cql - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/cassandra/templates/metrics-configmap.yaml b/charts/bitnami/cassandra/templates/metrics-configmap.yaml index 330008e2b..12595a213 100644 --- a/charts/bitnami/cassandra/templates/metrics-configmap.yaml +++ b/charts/bitnami/cassandra/templates/metrics-configmap.yaml @@ -8,12 +8,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-metrics-conf" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: cassandra app.kubernetes.io/component: cassandra-exporter - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/networkpolicy.yaml b/charts/bitnami/cassandra/templates/networkpolicy.yaml index 36f9c6e4e..1019d9a63 100644 --- a/charts/bitnami/cassandra/templates/networkpolicy.yaml +++ b/charts/bitnami/cassandra/templates/networkpolicy.yaml @@ -9,16 +9,14 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} ingress: # Allow inbound connections # CQL port @@ -30,8 +28,8 @@ spec: matchLabels: {{ include "common.names.fullname" . }}-client: "true" {{- end }} - - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + - podSelector: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} # Internal ports - ports: - port: intra @@ -39,7 +37,7 @@ spec: - port: jmx from: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- if .Values.metrics.enabled }} # Allow prometheus scrapes for metrics - ports: diff --git a/charts/bitnami/cassandra/templates/pdb.yaml b/charts/bitnami/cassandra/templates/pdb.yaml index b6ddbc225..f7c1c9dc3 100644 --- a/charts/bitnami/cassandra/templates/pdb.yaml +++ b/charts/bitnami/cassandra/templates/pdb.yaml @@ -9,10 +9,7 @@ kind: PodDisruptionBudget metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -23,6 +20,7 @@ spec: {{- if .Values.pdb.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/service.yaml b/charts/bitnami/cassandra/templates/service.yaml index a9e72a139..f84409650 100644 --- a/charts/bitnami/cassandra/templates/service.yaml +++ b/charts/bitnami/cassandra/templates/service.yaml @@ -8,18 +8,10 @@ kind: Service metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -60,4 +52,5 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/cassandra/templates/serviceaccount.yaml b/charts/bitnami/cassandra/templates/serviceaccount.yaml index 636301b27..b14c1985b 100644 --- a/charts/bitnami/cassandra/templates/serviceaccount.yaml +++ b/charts/bitnami/cassandra/templates/serviceaccount.yaml @@ -9,16 +9,10 @@ kind: ServiceAccount metadata: name: {{ include "cassandra.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/servicemonitor.yaml b/charts/bitnami/cassandra/templates/servicemonitor.yaml index 84893b2ab..5b8713084 100644 --- a/charts/bitnami/cassandra/templates/servicemonitor.yaml +++ b/charts/bitnami/cassandra/templates/servicemonitor.yaml @@ -9,16 +9,11 @@ kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} {{- if .Values.metrics.serviceMonitor.additionalLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} {{- end }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -27,7 +22,7 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/statefulset.yaml b/charts/bitnami/cassandra/templates/statefulset.yaml index 4f8f5817d..4da03a0a1 100644 --- a/charts/bitnami/cassandra/templates/statefulset.yaml +++ b/charts/bitnami/cassandra/templates/statefulset.yaml @@ -8,26 +8,21 @@ kind: StatefulSet metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} podManagementPolicy: {{ .Values.podManagementPolicy }} replicas: {{ .Values.replicaCount }} updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- toYaml .Values.podLabels | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} {{- if or .Values.podAnnotations (and .Values.metrics.enabled .Values.metrics.podAnnotations) }} annotations: {{- if .Values.podAnnotations }} @@ -47,8 +42,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} @@ -563,7 +558,7 @@ spec: kind: PersistentVolumeClaim metadata: name: data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }} {{- if .Values.persistence.annotations }} annotations: {{- toYaml .Values.persistence.annotations | nindent 10 }} {{- end }} @@ -579,7 +574,7 @@ spec: {{- if .Values.persistence.commitLogMountPath }} - metadata: name: commitlog - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }} {{- if .Values.persistence.annotations }} annotations: {{- toYaml .Values.persistence.annotations | nindent 10 }} {{- end }} diff --git a/charts/bitnami/cassandra/templates/tls-secret.yaml b/charts/bitnami/cassandra/templates/tls-secret.yaml index da71dd573..56722c8e3 100644 --- a/charts/bitnami/cassandra/templates/tls-secret.yaml +++ b/charts/bitnami/cassandra/templates/tls-secret.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/kafka/Chart.lock b/charts/bitnami/kafka/Chart.lock index 38edb9c5c..b3009cd7b 100644 --- a/charts/bitnami/kafka/Chart.lock +++ b/charts/bitnami/kafka/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: zookeeper repository: oci://registry-1.docker.io/bitnamicharts - version: 11.4.11 + version: 12.1.0 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:63d2b26d75270dc04ffaa7ab77c5a066c43fed92a84d381bcaffea0d390081fa -generated: "2023-08-18T16:20:17.24008372Z" + version: 2.9.0 +digest: sha256:a54db8d2946ff889eaa08317cdc9eccbfe55722b08c147ee0799925cd1b43c93 +generated: "2023-08-23T10:11:09.64327+02:00" diff --git a/charts/bitnami/kafka/Chart.yaml b/charts/bitnami/kafka/Chart.yaml index 4ef9ea815..ab60baac4 100644 --- a/charts/bitnami/kafka/Chart.yaml +++ b/charts/bitnami/kafka/Chart.yaml @@ -22,7 +22,7 @@ dependencies: - condition: zookeeper.enabled name: zookeeper repository: file://./charts/zookeeper - version: 11.x.x + version: 12.x.x - name: common repository: file://./charts/common tags: @@ -45,4 +45,4 @@ maintainers: name: kafka sources: - https://github.com/bitnami/charts/tree/main/bitnami/kafka -version: 24.0.14 +version: 25.0.1 diff --git a/charts/bitnami/kafka/README.md b/charts/bitnami/kafka/README.md index c2c4b9736..012174a1b 100644 --- a/charts/bitnami/kafka/README.md +++ b/charts/bitnami/kafka/README.md @@ -1209,6 +1209,10 @@ kubectl apply -f $NEW_PVC_MANIFEST_FILE Repeat this process for each replica you had in your Kafka cluster. Once completed, upgrade the cluster and the new Statefulset should reuse the existing PVCs. +### To 25.0.0 + +This major updates the Zookeeper subchart to it newest major, 12.0.0. For more information on this subchart's major, please refer to [zookeeper upgrade notes](https://github.com/bitnami/charts/tree/main/bitnami/zookeeper#to-1200). + ### To 23.0.0 This major updates Kafka to its newest version, 3.5.x. For more information, please refer to [kafka upgrade notes](https://kafka.apache.org/35/documentation.html#upgrade). diff --git a/charts/bitnami/kafka/charts/common/Chart.yaml b/charts/bitnami/kafka/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/kafka/charts/common/Chart.yaml +++ b/charts/bitnami/kafka/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/kafka/charts/common/README.md b/charts/bitnami/kafka/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/kafka/charts/common/README.md +++ b/charts/bitnami/kafka/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/kafka/charts/common/templates/_affinities.tpl b/charts/bitnami/kafka/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/kafka/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/kafka/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/kafka/charts/common/templates/_labels.tpl b/charts/bitnami/kafka/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/kafka/charts/common/templates/_labels.tpl +++ b/charts/bitnami/kafka/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/kafka/charts/zookeeper/Chart.lock b/charts/bitnami/kafka/charts/zookeeper/Chart.lock index e5a59ba3e..e9716f484 100644 --- a/charts/bitnami/kafka/charts/zookeeper/Chart.lock +++ b/charts/bitnami/kafka/charts/zookeeper/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-18T00:01:59.31754719Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:36:38.84686+02:00" diff --git a/charts/bitnami/kafka/charts/zookeeper/Chart.yaml b/charts/bitnami/kafka/charts/zookeeper/Chart.yaml index 8ff327240..3318f7bb8 100644 --- a/charts/bitnami/kafka/charts/zookeeper/Chart.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/Chart.yaml @@ -2,12 +2,12 @@ annotations: category: Infrastructure images: | - name: os-shell - image: docker.io/bitnami/os-shell:11-debian-11-r40 + image: docker.io/bitnami/os-shell:11-debian-11-r43 - name: zookeeper - image: docker.io/bitnami/zookeeper:3.8.2-debian-11-r27 + image: docker.io/bitnami/zookeeper:3.9.0-debian-11-r1 licenses: Apache-2.0 apiVersion: v2 -appVersion: 3.8.2 +appVersion: 3.9.0 dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts @@ -26,4 +26,4 @@ maintainers: name: zookeeper sources: - https://github.com/bitnami/charts/tree/main/bitnami/zookeeper -version: 11.4.11 +version: 12.1.0 diff --git a/charts/bitnami/kafka/charts/zookeeper/README.md b/charts/bitnami/kafka/charts/zookeeper/README.md index 296e054b0..cc04e11f1 100644 --- a/charts/bitnami/kafka/charts/zookeeper/README.md +++ b/charts/bitnami/kafka/charts/zookeeper/README.md @@ -82,7 +82,7 @@ The command removes all the Kubernetes components associated with the chart and | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------- | | `image.registry` | ZooKeeper image registry | `docker.io` | | `image.repository` | ZooKeeper image repository | `bitnami/zookeeper` | -| `image.tag` | ZooKeeper image tag (immutable tags are recommended) | `3.8.2-debian-11-r27` | +| `image.tag` | ZooKeeper image tag (immutable tags are recommended) | `3.9.0-debian-11-r1` | | `image.digest` | ZooKeeper image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | | `image.pullPolicy` | ZooKeeper image pull policy | `IfNotPresent` | | `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | @@ -248,7 +248,7 @@ The command removes all the Kubernetes components associated with the chart and | `volumePermissions.enabled` | Enable init container that changes the owner and group of the persistent volume | `false` | | `volumePermissions.image.registry` | Init container volume-permissions image registry | `docker.io` | | `volumePermissions.image.repository` | Init container volume-permissions image repository | `bitnami/os-shell` | -| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `11-debian-11-r40` | +| `volumePermissions.image.tag` | Init container volume-permissions image tag (immutable tags are recommended) | `11-debian-11-r43` | | `volumePermissions.image.digest` | Init container volume-permissions image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | | `volumePermissions.image.pullPolicy` | Init container volume-permissions image pull policy | `IfNotPresent` | | `volumePermissions.image.pullSecrets` | Init container volume-permissions image pull secrets | `[]` | diff --git a/charts/bitnami/kafka/charts/zookeeper/charts/common/Chart.yaml b/charts/bitnami/kafka/charts/zookeeper/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/kafka/charts/zookeeper/charts/common/Chart.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/kafka/charts/zookeeper/charts/common/README.md b/charts/bitnami/kafka/charts/zookeeper/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/kafka/charts/zookeeper/charts/common/README.md +++ b/charts/bitnami/kafka/charts/zookeeper/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_affinities.tpl b/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_labels.tpl b/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_labels.tpl +++ b/charts/bitnami/kafka/charts/zookeeper/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/configmap.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/configmap.yaml index 75f013767..1c5c60b31 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/configmap.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/configmap.yaml @@ -9,10 +9,8 @@ kind: ConfigMap metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: zookeeper {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/metrics-svc.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/metrics-svc.yaml index ebb73ec02..adc35c397 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/metrics-svc.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }}-metrics namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.metrics.service.type }} @@ -29,6 +21,7 @@ spec: - name: tcp-metrics port: {{ .Values.metrics.service.port }} targetPort: metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/networkpolicy.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/networkpolicy.yaml index a96b33396..4165e4a60 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/networkpolicy.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/networkpolicy.yaml @@ -9,16 +9,14 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} policyTypes: - Ingress ingress: @@ -34,7 +32,7 @@ spec: matchLabels: {{ include "common.names.fullname" . }}-client: "true" - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} # Allow internal communications between nodes - ports: @@ -42,5 +40,5 @@ spec: - port: {{ .Values.containerPorts.election }} from: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/pdb.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/pdb.yaml index 7a9a67a09..d657c9c5e 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/pdb.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/pdb.yaml @@ -10,11 +10,8 @@ kind: PodDisruptionBudget metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -25,7 +22,8 @@ spec: {{- if .Values.pdb.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: zookeeper {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/prometheusrule.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/prometheusrule.yaml index 70818e6c9..b5a3046a8 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/prometheusrule.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/prometheusrule.yaml @@ -8,16 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.prometheusRule.namespace }} - namespace: {{ .Values.metrics.prometheusRule.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/scripts-configmap.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/scripts-configmap.yaml index 794ba4fe6..87950a270 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/scripts-configmap.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/scripts-configmap.yaml @@ -8,11 +8,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/secrets.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/secrets.yaml index 7a9b3e2db..40b354413 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/secrets.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/secrets.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -29,11 +26,8 @@ kind: Secret metadata: name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -49,10 +43,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }}-client-tls-pass namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -68,10 +59,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }}-quorum-tls-pass namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/serviceaccount.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/serviceaccount.yaml index eda2e4a8b..f6113b9af 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/serviceaccount.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/serviceaccount.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ template "zookeeper.serviceAccountName" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper role: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.serviceAccount.annotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/servicemonitor.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/servicemonitor.yaml index 936a8c68b..8cc66ec0c 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/servicemonitor.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/servicemonitor.yaml @@ -8,19 +8,12 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- if .Values.metrics.serviceMonitor.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $ ) | nindent 4 }} {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -29,7 +22,7 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/statefulset.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/statefulset.yaml index 3ed040f8d..1d91580c2 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/statefulset.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/statefulset.yaml @@ -8,20 +8,18 @@ kind: StatefulSet metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper role: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.replicaCount }} podManagementPolicy: {{ .Values.podManagementPolicy }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: zookeeper serviceName: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }} {{- if .Values.updateStrategy }} @@ -42,11 +40,8 @@ spec: {{- if or (include "zookeeper.client.createTlsSecret" .) (include "zookeeper.quorum.createTlsSecret" .) }} checksum/tls-secrets: {{ include (print $.Template.BasePath "/tls-secrets.yaml") . | sha256sum }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: zookeeper - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "zookeeper.serviceAccountName" . }} {{- include "zookeeper.imagePullSecrets" . | nindent 6 }} @@ -57,8 +52,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "zookeeper" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "zookeeper" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "zookeeper" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "zookeeper" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/svc-headless.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/svc-headless.yaml index 0040bca81..611b84ab3 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/svc-headless.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/svc-headless.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.service.headless.annotations }} - annotations: - {{- if .Values.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.headless.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -43,5 +35,6 @@ spec: - name: tcp-election port: {{ .Values.service.ports.election }} targetPort: election - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/svc.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/svc.yaml index 5077eb925..2a894767f 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/svc.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/svc.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.service.annotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -72,5 +64,6 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper diff --git a/charts/bitnami/kafka/charts/zookeeper/templates/tls-secrets.yaml b/charts/bitnami/kafka/charts/zookeeper/templates/tls-secrets.yaml index df8442190..373bc8626 100644 --- a/charts/bitnami/kafka/charts/zookeeper/templates/tls-secrets.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/templates/tls-secrets.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -47,10 +44,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/kafka/charts/zookeeper/values.yaml b/charts/bitnami/kafka/charts/zookeeper/values.yaml index 1a8052d97..89f885db5 100644 --- a/charts/bitnami/kafka/charts/zookeeper/values.yaml +++ b/charts/bitnami/kafka/charts/zookeeper/values.yaml @@ -79,7 +79,7 @@ diagnosticMode: image: registry: docker.io repository: bitnami/zookeeper - tag: 3.8.2-debian-11-r27 + tag: 3.9.0-debian-11-r1 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -663,7 +663,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/os-shell - tag: 11-debian-11-r40 + tag: 11-debian-11-r43 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/charts/bitnami/kafka/templates/metrics/jmx-svc.yaml b/charts/bitnami/kafka/templates/metrics/jmx-svc.yaml index 0501de928..4924df27d 100644 --- a/charts/bitnami/kafka/templates/metrics/jmx-svc.yaml +++ b/charts/bitnami/kafka/templates/metrics/jmx-svc.yaml @@ -35,5 +35,5 @@ spec: protocol: TCP targetPort: metrics selector: {{- include "common.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: kafka + app.kubernetes.io/part-of: kafka {{- end }} diff --git a/charts/bitnami/mariadb/Chart.lock b/charts/bitnami/mariadb/Chart.lock index 5d6bd06d4..14201b03a 100644 --- a/charts/bitnami/mariadb/Chart.lock +++ b/charts/bitnami/mariadb/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-11T09:32:02.90916554Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:14:34.796011+02:00" diff --git a/charts/bitnami/mariadb/Chart.yaml b/charts/bitnami/mariadb/Chart.yaml index 10fe34d94..c4b5a2c62 100644 --- a/charts/bitnami/mariadb/Chart.yaml +++ b/charts/bitnami/mariadb/Chart.yaml @@ -37,4 +37,4 @@ maintainers: name: mariadb sources: - https://github.com/bitnami/charts/tree/main/bitnami/mariadb -version: 13.0.5 +version: 13.1.1 diff --git a/charts/bitnami/mariadb/charts/common/Chart.yaml b/charts/bitnami/mariadb/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/mariadb/charts/common/Chart.yaml +++ b/charts/bitnami/mariadb/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/mariadb/charts/common/README.md b/charts/bitnami/mariadb/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/mariadb/charts/common/README.md +++ b/charts/bitnami/mariadb/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/mariadb/charts/common/templates/_affinities.tpl b/charts/bitnami/mariadb/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/mariadb/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/mariadb/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/mariadb/charts/common/templates/_labels.tpl b/charts/bitnami/mariadb/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/mariadb/charts/common/templates/_labels.tpl +++ b/charts/bitnami/mariadb/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/mariadb/templates/networkpolicy-egress.yaml b/charts/bitnami/mariadb/templates/networkpolicy-egress.yaml index dc8991a4f..64af059fa 100644 --- a/charts/bitnami/mariadb/templates/networkpolicy-egress.yaml +++ b/charts/bitnami/mariadb/templates/networkpolicy-egress.yaml @@ -9,17 +9,13 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-egress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: podSelector: - matchLabels: - {{- include "common.labels.standard" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} policyTypes: - Egress egress: diff --git a/charts/bitnami/mariadb/templates/primary/configmap.yaml b/charts/bitnami/mariadb/templates/primary/configmap.yaml index a24d25a06..55ed4414e 100644 --- a/charts/bitnami/mariadb/templates/primary/configmap.yaml +++ b/charts/bitnami/mariadb/templates/primary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/primary/initialization-configmap.yaml b/charts/bitnami/mariadb/templates/primary/initialization-configmap.yaml index a9fe7ad80..e4f5b108a 100644 --- a/charts/bitnami/mariadb/templates/primary/initialization-configmap.yaml +++ b/charts/bitnami/mariadb/templates/primary/initialization-configmap.yaml @@ -9,8 +9,11 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "mariadb.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} data: {{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }} {{ end }} diff --git a/charts/bitnami/mariadb/templates/primary/networkpolicy-ingress.yaml b/charts/bitnami/mariadb/templates/primary/networkpolicy-ingress.yaml index 446de4d63..318a11943 100644 --- a/charts/bitnami/mariadb/templates/primary/networkpolicy-ingress.yaml +++ b/charts/bitnami/mariadb/templates/primary/networkpolicy-ingress.yaml @@ -9,18 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $primaryPodLabels := merge .Values.primary.podLabels .Values.commonLabels }} podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $primaryPodLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary - {{- include "common.labels.standard" . | nindent 6 }} ingress: {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} - from: @@ -50,10 +47,10 @@ spec: {{- end }} {{- if and .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled (eq .Values.architecture "replication") }} - from: + {{- $secondaryPodLabels := merge .Values.secondary.podLabels .Values.commonLabels }} - podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $secondaryPodLabels "context" $ ) | nindent 14 }} app.kubernetes.io/component: secondary - {{- include "common.labels.standard" . | nindent 14 }} {{- end }} {{- if .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules }} {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules "context" $) | nindent 4 }} diff --git a/charts/bitnami/mariadb/templates/primary/pdb.yaml b/charts/bitnami/mariadb/templates/primary/pdb.yaml index 21ed6cac0..0a9b21c71 100644 --- a/charts/bitnami/mariadb/templates/primary/pdb.yaml +++ b/charts/bitnami/mariadb/templates/primary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.primary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.primary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary {{- end }} diff --git a/charts/bitnami/mariadb/templates/primary/statefulset.yaml b/charts/bitnami/mariadb/templates/primary/statefulset.yaml index 0adbef16e..ee6ab57ad 100644 --- a/charts/bitnami/mariadb/templates/primary/statefulset.yaml +++ b/charts/bitnami/mariadb/templates/primary/statefulset.yaml @@ -8,19 +8,17 @@ kind: StatefulSet metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: 1 revisionHistoryLimit: {{ .Values.primary.revisionHistoryLimit }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary serviceName: {{ include "mariadb.primary.fullname" . }} {{- if .Values.primary.updateStrategy }} @@ -35,14 +33,8 @@ spec: {{- if .Values.primary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: primary - {{- if .Values.primary.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} spec: {{- include "mariadb.imagePullSecrets" . | nindent 6 }} {{- if .Values.primary.hostAliases }} @@ -56,8 +48,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.primary.nodeSelector }} @@ -379,14 +371,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.primary.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: primary {{- if .Values.primary.persistence.annotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.primary.persistence.annotations "context" $ ) | nindent 10 }} {{- end }} - {{- if .Values.primary.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }} - {{- end }} spec: accessModes: {{- range .Values.primary.persistence.accessModes }} diff --git a/charts/bitnami/mariadb/templates/primary/svc.yaml b/charts/bitnami/mariadb/templates/primary/svc.yaml index a12025eff..adf3685e0 100644 --- a/charts/bitnami/mariadb/templates/primary/svc.yaml +++ b/charts/bitnami/mariadb/templates/primary/svc.yaml @@ -8,17 +8,12 @@ kind: Service metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.service.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.primary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.primary.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }} @@ -32,7 +27,7 @@ spec: externalTrafficPolicy: {{ .Values.primary.service.externalTrafficPolicy | quote }} {{- end }} {{- if and (eq .Values.primary.service.type "LoadBalancer") .Values.primary.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ .Values.primary.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{- toYaml .Values.primary.service.loadBalancerSourceRanges | nindent 4 }} {{ end }} {{- if (and (eq .Values.primary.service.type "LoadBalancer") (not (empty .Values.primary.service.loadBalancerIP))) }} loadBalancerIP: {{ .Values.primary.service.loadBalancerIP }} @@ -62,5 +57,6 @@ spec: {{- if .Values.primary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/mariadb/templates/prometheusrules.yaml b/charts/bitnami/mariadb/templates/prometheusrules.yaml index 29eb87709..84927a269 100644 --- a/charts/bitnami/mariadb/templates/prometheusrules.yaml +++ b/charts/bitnami/mariadb/templates/prometheusrules.yaml @@ -8,16 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.prometheusRule.namespace }} - namespace: {{ .Values.metrics.prometheusRule.namespace }} - {{- else }} - namespace: {{ .Release.Namespace | quote }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/role.yaml b/charts/bitnami/mariadb/templates/role.yaml index 4d53ccecf..42ea25315 100644 --- a/charts/bitnami/mariadb/templates/role.yaml +++ b/charts/bitnami/mariadb/templates/role.yaml @@ -9,10 +9,7 @@ kind: Role metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/rolebinding.yaml b/charts/bitnami/mariadb/templates/rolebinding.yaml index f831afa9b..07b950682 100644 --- a/charts/bitnami/mariadb/templates/rolebinding.yaml +++ b/charts/bitnami/mariadb/templates/rolebinding.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/secondary/configmap.yaml b/charts/bitnami/mariadb/templates/secondary/configmap.yaml index 0129c97cc..8a9599144 100644 --- a/charts/bitnami/mariadb/templates/secondary/configmap.yaml +++ b/charts/bitnami/mariadb/templates/secondary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/secondary/networkpolicy-ingress.yaml b/charts/bitnami/mariadb/templates/secondary/networkpolicy-ingress.yaml index e715c5d22..a0d4cf321 100644 --- a/charts/bitnami/mariadb/templates/secondary/networkpolicy-ingress.yaml +++ b/charts/bitnami/mariadb/templates/secondary/networkpolicy-ingress.yaml @@ -9,18 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress-secondary" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $secondaryPodLabels := merge .Values.secondary.podLabels .Values.commonLabels }} podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $secondaryPodLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary - {{- include "common.labels.standard" . | nindent 6 }} ingress: {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} - from: diff --git a/charts/bitnami/mariadb/templates/secondary/pdb.yaml b/charts/bitnami/mariadb/templates/secondary/pdb.yaml index 2f91d7311..d4163f19e 100644 --- a/charts/bitnami/mariadb/templates/secondary/pdb.yaml +++ b/charts/bitnami/mariadb/templates/secondary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.secondary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.secondary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/mariadb/templates/secondary/statefulset.yaml b/charts/bitnami/mariadb/templates/secondary/statefulset.yaml index 3eb9f63f2..b5ef7a795 100644 --- a/charts/bitnami/mariadb/templates/secondary/statefulset.yaml +++ b/charts/bitnami/mariadb/templates/secondary/statefulset.yaml @@ -9,19 +9,17 @@ kind: StatefulSet metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.secondary.replicaCount }} revisionHistoryLimit: {{ .Values.secondary.revisionHistoryLimit }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary serviceName: {{ include "mariadb.secondary.fullname" . }} podManagementPolicy: {{ .Values.secondary.podManagementPolicy }} @@ -37,14 +35,8 @@ spec: {{- if .Values.secondary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: secondary - {{- if .Values.secondary.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} spec: {{- include "mariadb.imagePullSecrets" . | nindent 6 }} {{- if or .Values.secondary.schedulerName .Values.schedulerName }} @@ -58,8 +50,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "component" "secondary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "component" "secondary" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.secondary.nodeAffinityPreset.type "key" .Values.secondary.nodeAffinityPreset.key "values" .Values.secondary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.secondary.nodeSelector }} @@ -349,14 +341,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.secondary.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: secondary {{- if .Values.secondary.persistence.annotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.persistence.annotations "context" $ ) | nindent 10 }} {{- end }} - {{- if .Values.primary.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }} - {{- end }} spec: accessModes: {{- range .Values.secondary.persistence.accessModes }} diff --git a/charts/bitnami/mariadb/templates/secondary/svc.yaml b/charts/bitnami/mariadb/templates/secondary/svc.yaml index ca295c909..36fd81042 100644 --- a/charts/bitnami/mariadb/templates/secondary/svc.yaml +++ b/charts/bitnami/mariadb/templates/secondary/svc.yaml @@ -9,17 +9,12 @@ kind: Service metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.secondary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.service.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.secondary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.secondary.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }} @@ -33,7 +28,7 @@ spec: externalTrafficPolicy: {{ .Values.secondary.service.externalTrafficPolicy | quote }} {{- end }} {{- if and (eq .Values.secondary.service.type "LoadBalancer") .Values.secondary.service.loadBalancerSourceRanges }} - loadBalancerSourceRanges: {{ .Values.secondary.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: {{- toYaml .Values.secondary.service.loadBalancerSourceRanges | nindent 4 }} {{ end }} {{- if and (eq .Values.secondary.service.type "LoadBalancer") (not (empty .Values.secondary.service.loadBalancerIP)) }} loadBalancerIP: {{ .Values.secondary.service.loadBalancerIP }} @@ -63,6 +58,7 @@ spec: {{- if .Values.secondary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/mariadb/templates/secrets.yaml b/charts/bitnami/mariadb/templates/secrets.yaml index 223527635..3cd3dcfc6 100644 --- a/charts/bitnami/mariadb/templates/secrets.yaml +++ b/charts/bitnami/mariadb/templates/secrets.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -55,10 +52,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-root namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -80,10 +74,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-custom-user namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/serviceaccount.yaml b/charts/bitnami/mariadb/templates/serviceaccount.yaml index 9945aa65a..eb00a4363 100644 --- a/charts/bitnami/mariadb/templates/serviceaccount.yaml +++ b/charts/bitnami/mariadb/templates/serviceaccount.yaml @@ -9,16 +9,10 @@ kind: ServiceAccount metadata: name: {{ include "mariadb.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/mariadb/templates/servicemonitor.yaml b/charts/bitnami/mariadb/templates/servicemonitor.yaml index 6217f989e..3ab4bb68b 100644 --- a/charts/bitnami/mariadb/templates/servicemonitor.yaml +++ b/charts/bitnami/mariadb/templates/servicemonitor.yaml @@ -8,18 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace | quote }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }} - {{- end }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -46,7 +37,7 @@ spec: matchNames: - {{ .Release.Namespace | quote }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/mysql/Chart.lock b/charts/bitnami/mysql/Chart.lock index db9c5a09d..5a631bb03 100644 --- a/charts/bitnami/mysql/Chart.lock +++ b/charts/bitnami/mysql/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-17T17:23:26.77658244Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:23:05.454524+02:00" diff --git a/charts/bitnami/mysql/Chart.yaml b/charts/bitnami/mysql/Chart.yaml index f06e7dc6c..78beefc65 100644 --- a/charts/bitnami/mysql/Chart.yaml +++ b/charts/bitnami/mysql/Chart.yaml @@ -36,4 +36,4 @@ maintainers: name: mysql sources: - https://github.com/bitnami/charts/tree/main/bitnami/mysql -version: 9.11.2 +version: 9.12.0 diff --git a/charts/bitnami/mysql/charts/common/Chart.yaml b/charts/bitnami/mysql/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/mysql/charts/common/Chart.yaml +++ b/charts/bitnami/mysql/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/mysql/charts/common/README.md b/charts/bitnami/mysql/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/mysql/charts/common/README.md +++ b/charts/bitnami/mysql/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/mysql/charts/common/templates/_affinities.tpl b/charts/bitnami/mysql/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/mysql/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/mysql/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/mysql/charts/common/templates/_labels.tpl b/charts/bitnami/mysql/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/mysql/charts/common/templates/_labels.tpl +++ b/charts/bitnami/mysql/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/mysql/templates/metrics-svc.yaml b/charts/bitnami/mysql/templates/metrics-svc.yaml index 4f583daa7..39f61611e 100644 --- a/charts/bitnami/mysql/templates/metrics-svc.yaml +++ b/charts/bitnami/mysql/templates/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.metrics.service.type }} @@ -33,5 +25,5 @@ spec: targetPort: metrics protocol: TCP name: metrics - selector: {{- include "common.labels.matchLabels" $ | nindent 4 }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/networkpolicy.yaml b/charts/bitnami/mysql/templates/networkpolicy.yaml index 45a67db36..2b076bdbf 100644 --- a/charts/bitnami/mysql/templates/networkpolicy.yaml +++ b/charts/bitnami/mysql/templates/networkpolicy.yaml @@ -9,17 +9,13 @@ apiVersion: {{ template "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: podSelector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} ingress: # Allow inbound connections - ports: @@ -34,8 +30,7 @@ spec: {{ toYaml .Values.networkPolicy.explicitNamespacesSelector | indent 12 }} {{- end }} - podSelector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- end }} {{- if .Values.metrics.enabled }} # Allow prometheus scrapes diff --git a/charts/bitnami/mysql/templates/primary/configmap.yaml b/charts/bitnami/mysql/templates/primary/configmap.yaml index 847142479..5acefa105 100644 --- a/charts/bitnami/mysql/templates/primary/configmap.yaml +++ b/charts/bitnami/mysql/templates/primary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mysql.primary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/primary/initialization-configmap.yaml b/charts/bitnami/mysql/templates/primary/initialization-configmap.yaml index c3d17eec4..cae5cef15 100644 --- a/charts/bitnami/mysql/templates/primary/initialization-configmap.yaml +++ b/charts/bitnami/mysql/templates/primary/initialization-configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "mysql.primary.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/primary/pdb.yaml b/charts/bitnami/mysql/templates/primary/pdb.yaml index 0d59b1399..3f99da468 100644 --- a/charts/bitnami/mysql/templates/primary/pdb.yaml +++ b/charts/bitnami/mysql/templates/primary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mysql.primary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.primary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.primary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary {{- end }} diff --git a/charts/bitnami/mysql/templates/primary/statefulset.yaml b/charts/bitnami/mysql/templates/primary/statefulset.yaml index b77057f34..1fdce74f9 100644 --- a/charts/bitnami/mysql/templates/primary/statefulset.yaml +++ b/charts/bitnami/mysql/templates/primary/statefulset.yaml @@ -8,19 +8,17 @@ kind: StatefulSet metadata: name: {{ include "mysql.primary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: 1 podManagementPolicy: {{ .Values.primary.podManagementPolicy | quote }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary serviceName: {{ include "mysql.primary.fullname" . }} {{- if .Values.primary.updateStrategy }} @@ -35,11 +33,8 @@ spec: {{- if .Values.primary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: primary - {{- if .Values.primary.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.podLabels "context" $ ) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "mysql.serviceAccountName" . }} {{- include "mysql.imagePullSecrets" . | nindent 6 }} @@ -50,8 +45,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.primary.nodeSelector }} @@ -375,18 +370,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} - {{- end }} - annotations: - {{- if .Values.primary.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.primary.persistence.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.primary.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 10 }} + {{- end }} spec: accessModes: {{- range .Values.primary.persistence.accessModes }} diff --git a/charts/bitnami/mysql/templates/primary/svc-headless.yaml b/charts/bitnami/mysql/templates/primary/svc-headless.yaml index 749afb659..5f4c03a25 100644 --- a/charts/bitnami/mysql/templates/primary/svc-headless.yaml +++ b/charts/bitnami/mysql/templates/primary/svc-headless.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ include "mysql.primary.fullname" . }}-headless namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.primary.service.headless.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.headless.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.primary.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -30,5 +22,6 @@ spec: - name: mysql port: {{ .Values.primary.service.ports.mysql }} targetPort: mysql - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/mysql/templates/primary/svc.yaml b/charts/bitnami/mysql/templates/primary/svc.yaml index 2ee9cdcde..2416fccec 100644 --- a/charts/bitnami/mysql/templates/primary/svc.yaml +++ b/charts/bitnami/mysql/templates/primary/svc.yaml @@ -8,18 +8,12 @@ kind: Service metadata: name: {{ include "mysql.primary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.service.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.primary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.primary.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.primary.service.type }} {{- if and .Values.primary.service.clusterIP (eq .Values.primary.service.type "ClusterIP") }} @@ -53,5 +47,6 @@ spec: {{- if .Values.primary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/mysql/templates/prometheusrule.yaml b/charts/bitnami/mysql/templates/prometheusrule.yaml index acf1ceee9..1facb08ba 100644 --- a/charts/bitnami/mysql/templates/prometheusrule.yaml +++ b/charts/bitnami/mysql/templates/prometheusrule.yaml @@ -9,11 +9,8 @@ kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/role.yaml b/charts/bitnami/mysql/templates/role.yaml index ed05cf436..66973f6da 100644 --- a/charts/bitnami/mysql/templates/role.yaml +++ b/charts/bitnami/mysql/templates/role.yaml @@ -9,10 +9,7 @@ kind: Role metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/rolebinding.yaml b/charts/bitnami/mysql/templates/rolebinding.yaml index 43594dba0..28e0657ff 100644 --- a/charts/bitnami/mysql/templates/rolebinding.yaml +++ b/charts/bitnami/mysql/templates/rolebinding.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/secondary/configmap.yaml b/charts/bitnami/mysql/templates/secondary/configmap.yaml index 19537c076..ad4be47bd 100644 --- a/charts/bitnami/mysql/templates/secondary/configmap.yaml +++ b/charts/bitnami/mysql/templates/secondary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mysql.secondary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/secondary/pdb.yaml b/charts/bitnami/mysql/templates/secondary/pdb.yaml index 501c7aab9..dc75a85a1 100644 --- a/charts/bitnami/mysql/templates/secondary/pdb.yaml +++ b/charts/bitnami/mysql/templates/secondary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mysql.secondary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.secondary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.secondary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/mysql/templates/secondary/statefulset.yaml b/charts/bitnami/mysql/templates/secondary/statefulset.yaml index 6ad25d96d..481b6cd20 100644 --- a/charts/bitnami/mysql/templates/secondary/statefulset.yaml +++ b/charts/bitnami/mysql/templates/secondary/statefulset.yaml @@ -9,19 +9,17 @@ kind: StatefulSet metadata: name: {{ include "mysql.secondary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.secondary.replicaCount }} podManagementPolicy: {{ .Values.secondary.podManagementPolicy | quote }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary serviceName: {{ include "mysql.secondary.fullname" . }} {{- if .Values.secondary.updateStrategy }} @@ -36,11 +34,8 @@ spec: {{- if .Values.secondary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: secondary - {{- if .Values.secondary.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.podLabels "context" $ ) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ include "mysql.serviceAccountName" . }} {{- include "mysql.imagePullSecrets" . | nindent 6 }} @@ -51,8 +46,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.secondary.nodeAffinityPreset.type "key" .Values.secondary.nodeAffinityPreset.key "values" .Values.secondary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.secondary.nodeSelector }} @@ -355,18 +350,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} - {{- end }} - annotations: - {{- if .Values.secondary.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.secondary.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.secondary.persistence.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.secondary.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 10 }} + {{- end }} spec: accessModes: {{- range .Values.secondary.persistence.accessModes }} diff --git a/charts/bitnami/mysql/templates/secondary/svc-headless.yaml b/charts/bitnami/mysql/templates/secondary/svc-headless.yaml index 1e64d8152..05d932088 100644 --- a/charts/bitnami/mysql/templates/secondary/svc-headless.yaml +++ b/charts/bitnami/mysql/templates/secondary/svc-headless.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ include "mysql.secondary.fullname" . }}-headless namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.secondary.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.secondary.service.headless.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.headless.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.secondary.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -31,6 +23,7 @@ spec: - name: mysql port: {{ .Values.secondary.service.ports.mysql }} targetPort: mysql - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/mysql/templates/secondary/svc.yaml b/charts/bitnami/mysql/templates/secondary/svc.yaml index 90ce08fc8..431a66dbc 100644 --- a/charts/bitnami/mysql/templates/secondary/svc.yaml +++ b/charts/bitnami/mysql/templates/secondary/svc.yaml @@ -9,18 +9,12 @@ kind: Service metadata: name: {{ include "mysql.secondary.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.secondary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.service.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.secondary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.secondary.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.secondary.service.type }} {{- if and .Values.secondary.service.clusterIP (eq .Values.secondary.service.type "ClusterIP") }} @@ -54,6 +48,7 @@ spec: {{- if .Values.secondary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/mysql/templates/secrets.yaml b/charts/bitnami/mysql/templates/secrets.yaml index 4f1be99b8..530a12cd9 100644 --- a/charts/bitnami/mysql/templates/secrets.yaml +++ b/charts/bitnami/mysql/templates/secrets.yaml @@ -13,10 +13,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -35,10 +32,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-root namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -60,10 +54,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-custom-user namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/mysql/templates/serviceaccount.yaml b/charts/bitnami/mysql/templates/serviceaccount.yaml index 4c6282966..20c8d2642 100644 --- a/charts/bitnami/mysql/templates/serviceaccount.yaml +++ b/charts/bitnami/mysql/templates/serviceaccount.yaml @@ -9,17 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "mysql.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- if (not .Values.auth.customPasswordFiles) }} secrets: diff --git a/charts/bitnami/mysql/templates/servicemonitor.yaml b/charts/bitnami/mysql/templates/servicemonitor.yaml index 706212064..940ed3168 100644 --- a/charts/bitnami/mysql/templates/servicemonitor.yaml +++ b/charts/bitnami/mysql/templates/servicemonitor.yaml @@ -9,20 +9,12 @@ kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} + {{- if or .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel | quote }} endpoints: @@ -46,7 +38,7 @@ spec: matchNames: - {{ include "common.names.namespace" . | quote }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} diff --git a/charts/bitnami/postgresql/Chart.lock b/charts/bitnami/postgresql/Chart.lock index 1c9899c9a..089248ded 100644 --- a/charts/bitnami/postgresql/Chart.lock +++ b/charts/bitnami/postgresql/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-08T22:08:51.350900347Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:27:37.862238+02:00" diff --git a/charts/bitnami/postgresql/Chart.yaml b/charts/bitnami/postgresql/Chart.yaml index 2b36c0165..b91be904c 100644 --- a/charts/bitnami/postgresql/Chart.yaml +++ b/charts/bitnami/postgresql/Chart.yaml @@ -38,4 +38,4 @@ maintainers: name: postgresql sources: - https://github.com/bitnami/charts/tree/main/bitnami/postgresql -version: 12.8.5 +version: 12.9.0 diff --git a/charts/bitnami/postgresql/charts/common/Chart.yaml b/charts/bitnami/postgresql/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/postgresql/charts/common/Chart.yaml +++ b/charts/bitnami/postgresql/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/postgresql/charts/common/README.md b/charts/bitnami/postgresql/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/postgresql/charts/common/README.md +++ b/charts/bitnami/postgresql/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/postgresql/charts/common/templates/_affinities.tpl b/charts/bitnami/postgresql/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/postgresql/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/postgresql/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/postgresql/charts/common/templates/_labels.tpl b/charts/bitnami/postgresql/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/postgresql/charts/common/templates/_labels.tpl +++ b/charts/bitnami/postgresql/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/postgresql/templates/backup/cronjob.yaml b/charts/bitnami/postgresql/templates/backup/cronjob.yaml index ca4ba4499..d14bdd664 100644 --- a/charts/bitnami/postgresql/templates/backup/cronjob.yaml +++ b/charts/bitnami/postgresql/templates/backup/cronjob.yaml @@ -10,22 +10,12 @@ kind: CronJob metadata: name: {{ include "postgresql.primary.fullname" . }}-pgdumpall namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.backup.cronjob.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pg_dumpall - {{- if .Values.backup.cronjob.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.labels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.backup.cronjob.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.backup.cronjob.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.backup.cronjob.annotations .Values.commonAnnotations }} + {{- if $annotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: schedule: {{ quote .Values.backup.cronjob.schedule }} @@ -42,22 +32,10 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 12 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 12 }} app.kubernetes.io/component: pg_dumpall - {{- if .Values.backup.cronjob.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.labels "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 12 }} - {{- end }} - {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.backup.cronjob.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.backup.cronjob.annotations "context" $) | nindent 12 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 12 }} - {{- end }} + {{- if $annotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 12 }} {{- end }} spec: containers: diff --git a/charts/bitnami/postgresql/templates/backup/pvc.yaml b/charts/bitnami/postgresql/templates/backup/pvc.yaml index 6cd6d64d3..7f86be1b2 100644 --- a/charts/bitnami/postgresql/templates/backup/pvc.yaml +++ b/charts/bitnami/postgresql/templates/backup/pvc.yaml @@ -9,25 +9,18 @@ kind: PersistentVolumeClaim metadata: name: {{ include "postgresql.primary.fullname" . }}-pgdumpall namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.backup.cronjob.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: pg_dumpall - {{- if .Values.backup.cronjob.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.backup.cronjob.labels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations .Values.backup.cronjob.storage.resourcePolicy}} + {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations .Values.backup.cronjob.storage.resourcePolicy }} annotations: - {{- if .Values.backup.cronjob.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.backup.cronjob.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.backup.cronjob.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.backup.cronjob.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if .Values.backup.cronjob.storage.resourcePolicy }} helm.sh/resource-policy: {{ .Values.backup.cronjob.storage.resourcePolicy | quote }} + {{- end }} {{- end }} spec: accessModes: diff --git a/charts/bitnami/postgresql/templates/networkpolicy-egress.yaml b/charts/bitnami/postgresql/templates/networkpolicy-egress.yaml index db453822b..b67817c05 100644 --- a/charts/bitnami/postgresql/templates/networkpolicy-egress.yaml +++ b/charts/bitnami/postgresql/templates/networkpolicy-egress.yaml @@ -9,16 +9,13 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-egress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} policyTypes: - Egress egress: diff --git a/charts/bitnami/postgresql/templates/primary/configmap.yaml b/charts/bitnami/postgresql/templates/primary/configmap.yaml index 0873d00e0..cc5e9cd87 100644 --- a/charts/bitnami/postgresql/templates/primary/configmap.yaml +++ b/charts/bitnami/postgresql/templates/primary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-configuration" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/primary/extended-configmap.yaml b/charts/bitnami/postgresql/templates/primary/extended-configmap.yaml index 522deefd6..62e07fced 100644 --- a/charts/bitnami/postgresql/templates/primary/extended-configmap.yaml +++ b/charts/bitnami/postgresql/templates/primary/extended-configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-extended-configuration" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/primary/initialization-configmap.yaml b/charts/bitnami/postgresql/templates/primary/initialization-configmap.yaml index ddd2fb412..8a359c663 100644 --- a/charts/bitnami/postgresql/templates/primary/initialization-configmap.yaml +++ b/charts/bitnami/postgresql/templates/primary/initialization-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/primary/metrics-configmap.yaml b/charts/bitnami/postgresql/templates/primary/metrics-configmap.yaml index d5122183a..a219674fc 100644 --- a/charts/bitnami/postgresql/templates/primary/metrics-configmap.yaml +++ b/charts/bitnami/postgresql/templates/primary/metrics-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-metrics" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/primary/metrics-svc.yaml b/charts/bitnami/postgresql/templates/primary/metrics-svc.yaml index 1cbde4b8b..07f2beb8f 100644 --- a/charts/bitnami/postgresql/templates/primary/metrics-svc.yaml +++ b/charts/bitnami/postgresql/templates/primary/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -33,6 +25,7 @@ spec: - name: http-metrics port: {{ .Values.metrics.service.ports.metrics }} targetPort: http-metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary {{- end }} diff --git a/charts/bitnami/postgresql/templates/primary/networkpolicy.yaml b/charts/bitnami/postgresql/templates/primary/networkpolicy.yaml index e9ef51799..786c9e234 100644 --- a/charts/bitnami/postgresql/templates/primary/networkpolicy.yaml +++ b/charts/bitnami/postgresql/templates/primary/networkpolicy.yaml @@ -9,17 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "postgresql.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- $primaryPodLabels := merge .Values.primary.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $primaryPodLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary ingress: {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} @@ -50,8 +48,9 @@ spec: {{- end }} {{- if and .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled (eq .Values.architecture "replication") }} - from: + {{- $readPodLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $readPodLabels "context" $ ) | nindent 14 }} app.kubernetes.io/component: read ports: - port: {{ .Values.containerPorts.postgresql }} diff --git a/charts/bitnami/postgresql/templates/primary/servicemonitor.yaml b/charts/bitnami/postgresql/templates/primary/servicemonitor.yaml index 872ae74bb..b2c937d32 100644 --- a/charts/bitnami/postgresql/templates/primary/servicemonitor.yaml +++ b/charts/bitnami/postgresql/templates/primary/servicemonitor.yaml @@ -9,14 +9,9 @@ kind: ServiceMonitor metadata: name: {{ include "postgresql.primary.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -25,10 +20,8 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - {{- if .Values.metrics.serviceMonitor.selector }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} - {{- end }} + {{- $svcLabels := merge .Values.metrics.serviceMonitor.selector .Values.commonLabels }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $svcLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics endpoints: - port: http-metrics diff --git a/charts/bitnami/postgresql/templates/primary/statefulset.yaml b/charts/bitnami/postgresql/templates/primary/statefulset.yaml index 596ea859d..22bbac598 100644 --- a/charts/bitnami/postgresql/templates/primary/statefulset.yaml +++ b/charts/bitnami/postgresql/templates/primary/statefulset.yaml @@ -9,22 +9,12 @@ kind: StatefulSet metadata: name: {{ include "postgresql.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.primary.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.labels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.primary.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.primary.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: replicas: 1 @@ -32,20 +22,15 @@ spec: {{- if .Values.primary.updateStrategy }} updateStrategy: {{- toYaml .Values.primary.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary template: metadata: name: {{ include "postgresql.primary.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.primary.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.podLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if or (include "postgresql.primary.createConfigmap" .) (include "postgresql.primary.createExtendedConfigmap" .) .Values.primary.podAnnotations }} annotations: {{- if (include "postgresql.primary.createConfigmap" .) }} @@ -71,8 +56,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.primary.nodeSelector }} diff --git a/charts/bitnami/postgresql/templates/primary/svc-headless.yaml b/charts/bitnami/postgresql/templates/primary/svc-headless.yaml index c387809be..58fc59089 100644 --- a/charts/bitnami/postgresql/templates/primary/svc-headless.yaml +++ b/charts/bitnami/postgresql/templates/primary/svc-headless.yaml @@ -8,20 +8,13 @@ kind: Service metadata: name: {{ include "postgresql.primary.svc.headless" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }} annotations: - {{- if .Values.primary.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.service.headless.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.primary.service.headless.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.primary.service.headless.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} # Use this annotation in addition to the actual publishNotReadyAddresses # field below because the annotation will stop being respected soon but the # field is broken in some versions of Kubernetes: @@ -38,5 +31,6 @@ spec: - name: tcp-postgresql port: {{ template "postgresql.service.port" . }} targetPort: tcp-postgresql - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/postgresql/templates/primary/svc.yaml b/charts/bitnami/postgresql/templates/primary/svc.yaml index 6d42aa85f..8fe53f9c7 100644 --- a/charts/bitnami/postgresql/templates/primary/svc.yaml +++ b/charts/bitnami/postgresql/templates/primary/svc.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ include "postgresql.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.primary.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.primary.service.type }} @@ -54,5 +46,6 @@ spec: {{- if .Values.primary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/postgresql/templates/prometheusrule.yaml b/charts/bitnami/postgresql/templates/prometheusrule.yaml index 0fcba252a..7c75103d7 100644 --- a/charts/bitnami/postgresql/templates/prometheusrule.yaml +++ b/charts/bitnami/postgresql/templates/prometheusrule.yaml @@ -9,14 +9,9 @@ kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.prometheusRule.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.prometheusRule.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.labels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/psp.yaml b/charts/bitnami/postgresql/templates/psp.yaml index 0a39350c4..f6bf59f58 100644 --- a/charts/bitnami/postgresql/templates/psp.yaml +++ b/charts/bitnami/postgresql/templates/psp.yaml @@ -10,10 +10,7 @@ kind: PodSecurityPolicy metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/read/extended-configmap.yaml b/charts/bitnami/postgresql/templates/read/extended-configmap.yaml index 1f07471a6..ef188d7ce 100644 --- a/charts/bitnami/postgresql/templates/read/extended-configmap.yaml +++ b/charts/bitnami/postgresql/templates/read/extended-configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-extended-configuration" (include "postgresql.readReplica.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/read/metrics-configmap.yaml b/charts/bitnami/postgresql/templates/read/metrics-configmap.yaml index b2058a5c1..911547502 100644 --- a/charts/bitnami/postgresql/templates/read/metrics-configmap.yaml +++ b/charts/bitnami/postgresql/templates/read/metrics-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/read/metrics-svc.yaml b/charts/bitnami/postgresql/templates/read/metrics-svc.yaml index 8aa0a918d..76a0ea901 100644 --- a/charts/bitnami/postgresql/templates/read/metrics-svc.yaml +++ b/charts/bitnami/postgresql/templates/read/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "postgresql.readReplica.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics-read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.metrics.service.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -33,6 +25,7 @@ spec: - name: http-metrics port: {{ .Values.metrics.service.ports.metrics }} targetPort: http-metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read {{- end }} diff --git a/charts/bitnami/postgresql/templates/read/networkpolicy.yaml b/charts/bitnami/postgresql/templates/read/networkpolicy.yaml index 90321ee08..e9d02ee47 100644 --- a/charts/bitnami/postgresql/templates/read/networkpolicy.yaml +++ b/charts/bitnami/postgresql/templates/read/networkpolicy.yaml @@ -9,17 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "postgresql.readReplica.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: + {{- $podLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: read ingress: {{- if and .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.enabled (or .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.namespaceSelector .Values.networkPolicy.ingressRules.readReplicasAccessOnlyFrom.podSelector) }} diff --git a/charts/bitnami/postgresql/templates/read/servicemonitor.yaml b/charts/bitnami/postgresql/templates/read/servicemonitor.yaml index 93dbd25b4..7be04f6e0 100644 --- a/charts/bitnami/postgresql/templates/read/servicemonitor.yaml +++ b/charts/bitnami/postgresql/templates/read/servicemonitor.yaml @@ -9,14 +9,9 @@ kind: ServiceMonitor metadata: name: {{ include "postgresql.readReplica.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics-read - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -25,10 +20,8 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} - {{- if .Values.metrics.serviceMonitor.selector }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} - {{- end }} + {{- $svcLabels := merge .Values.metrics.serviceMonitor.selector .Values.commonLabels }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $svcLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics-read endpoints: - port: http-metrics diff --git a/charts/bitnami/postgresql/templates/read/statefulset.yaml b/charts/bitnami/postgresql/templates/read/statefulset.yaml index 0f53fa525..fc73ca01e 100644 --- a/charts/bitnami/postgresql/templates/read/statefulset.yaml +++ b/charts/bitnami/postgresql/templates/read/statefulset.yaml @@ -10,22 +10,12 @@ kind: StatefulSet metadata: name: {{ include "postgresql.readReplica.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.readReplicas.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.labels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.readReplicas.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.readReplicas.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.readReplicas.replicaCount }} @@ -33,20 +23,15 @@ spec: {{- if .Values.readReplicas.updateStrategy }} updateStrategy: {{- toYaml .Values.readReplicas.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: read template: metadata: name: {{ include "postgresql.readReplica.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: read - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.readReplicas.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.podLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if or (include "postgresql.readReplicas.createExtendedConfigmap" .) .Values.readReplicas.podAnnotations }} annotations: {{- if (include "postgresql.readReplicas.createExtendedConfigmap" .) }} @@ -69,8 +54,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAffinityPreset "component" "read" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAntiAffinityPreset "component" "read" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAffinityPreset "component" "read" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.readReplicas.podAntiAffinityPreset "component" "read" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.readReplicas.nodeAffinityPreset.type "key" .Values.readReplicas.nodeAffinityPreset.key "values" .Values.readReplicas.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.readReplicas.nodeSelector }} diff --git a/charts/bitnami/postgresql/templates/read/svc-headless.yaml b/charts/bitnami/postgresql/templates/read/svc-headless.yaml index 842b7be7e..26d43e753 100644 --- a/charts/bitnami/postgresql/templates/read/svc-headless.yaml +++ b/charts/bitnami/postgresql/templates/read/svc-headless.yaml @@ -9,20 +9,13 @@ kind: Service metadata: name: {{ include "postgresql.readReplica.svc.headless" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read - {{- if or .Values.readReplicas.service.headless.annotations .Values.commonAnnotations }} annotations: - {{- if .Values.readReplicas.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.readReplicas.service.headless.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.readReplicas.service.headless.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.readReplicas.service.headless.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- end }} # Use this annotation in addition to the actual publishNotReadyAddresses # field below because the annotation will stop being respected soon but the # field is broken in some versions of Kubernetes: @@ -39,6 +32,7 @@ spec: - name: tcp-postgresql port: {{ include "postgresql.readReplica.service.port" . }} targetPort: tcp-postgresql - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read {{- end }} diff --git a/charts/bitnami/postgresql/templates/read/svc.yaml b/charts/bitnami/postgresql/templates/read/svc.yaml index 108c694d8..9a0ce8ad4 100644 --- a/charts/bitnami/postgresql/templates/read/svc.yaml +++ b/charts/bitnami/postgresql/templates/read/svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ include "postgresql.readReplica.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.readReplicas.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.readReplicas.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.readReplicas.service.type }} @@ -55,6 +47,7 @@ spec: {{- if .Values.readReplicas.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.readReplicas.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.readReplicas.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: read {{- end }} diff --git a/charts/bitnami/postgresql/templates/role.yaml b/charts/bitnami/postgresql/templates/role.yaml index 964fcfe0a..a05805e72 100644 --- a/charts/bitnami/postgresql/templates/role.yaml +++ b/charts/bitnami/postgresql/templates/role.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/rolebinding.yaml b/charts/bitnami/postgresql/templates/rolebinding.yaml index 80f88ed45..c22deae0d 100644 --- a/charts/bitnami/postgresql/templates/rolebinding.yaml +++ b/charts/bitnami/postgresql/templates/rolebinding.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/secrets.yaml b/charts/bitnami/postgresql/templates/secrets.yaml index d8929006d..589c06deb 100644 --- a/charts/bitnami/postgresql/templates/secrets.yaml +++ b/charts/bitnami/postgresql/templates/secrets.yaml @@ -29,10 +29,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -60,10 +57,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-postgres namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -85,10 +79,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-custom-user namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/serviceaccount.yaml b/charts/bitnami/postgresql/templates/serviceaccount.yaml index 2bcb74bcc..245e66a91 100644 --- a/charts/bitnami/postgresql/templates/serviceaccount.yaml +++ b/charts/bitnami/postgresql/templates/serviceaccount.yaml @@ -9,16 +9,10 @@ kind: ServiceAccount metadata: name: {{ include "postgresql.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/postgresql/templates/tls-secrets.yaml b/charts/bitnami/postgresql/templates/tls-secrets.yaml index 124294a1c..3374206e8 100644 --- a/charts/bitnami/postgresql/templates/tls-secrets.yaml +++ b/charts/bitnami/postgresql/templates/tls-secrets.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/Chart.lock b/charts/bitnami/redis/Chart.lock index 7cc7e3219..d30db98a5 100644 --- a/charts/bitnami/redis/Chart.lock +++ b/charts/bitnami/redis/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-15T14:43:37.28793586Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:31:05.788165+02:00" diff --git a/charts/bitnami/redis/Chart.yaml b/charts/bitnami/redis/Chart.yaml index 36ee01b37..e6c1dfaf5 100644 --- a/charts/bitnami/redis/Chart.yaml +++ b/charts/bitnami/redis/Chart.yaml @@ -37,4 +37,4 @@ maintainers: name: redis sources: - https://github.com/bitnami/charts/tree/main/bitnami/redis -version: 17.15.6 +version: 17.16.0 diff --git a/charts/bitnami/redis/charts/common/Chart.yaml b/charts/bitnami/redis/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/redis/charts/common/Chart.yaml +++ b/charts/bitnami/redis/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/redis/charts/common/README.md b/charts/bitnami/redis/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/redis/charts/common/README.md +++ b/charts/bitnami/redis/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/redis/charts/common/templates/_affinities.tpl b/charts/bitnami/redis/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/redis/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/redis/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/redis/charts/common/templates/_labels.tpl b/charts/bitnami/redis/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/redis/charts/common/templates/_labels.tpl +++ b/charts/bitnami/redis/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/redis/templates/configmap.yaml b/charts/bitnami/redis/templates/configmap.yaml index 23dcafa95..c616599c8 100644 --- a/charts/bitnami/redis/templates/configmap.yaml +++ b/charts/bitnami/redis/templates/configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-configuration" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/headless-svc.yaml b/charts/bitnami/redis/templates/headless-svc.yaml index f6ab1a130..0dab3b63f 100644 --- a/charts/bitnami/redis/templates/headless-svc.yaml +++ b/charts/bitnami/redis/templates/headless-svc.yaml @@ -8,18 +8,13 @@ kind: Service metadata: name: {{ printf "%s-headless" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} annotations: - {{- if .Values.sentinel.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.service.headless.annotations "context" $) | nindent 4 }} + {{- if or .Values.sentinel.service.headless.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.sentinel.service.headless.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- include "redis.externalDNS.annotations" . | nindent 4 }} + {{- include "redis.externalDNS.annotations" . | nindent 4 }} spec: type: ClusterIP clusterIP: None @@ -35,4 +30,4 @@ spec: port: {{ .Values.sentinel.service.ports.sentinel }} targetPort: redis-sentinel {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/redis/templates/health-configmap.yaml b/charts/bitnami/redis/templates/health-configmap.yaml index e648d9c49..95ade5c41 100644 --- a/charts/bitnami/redis/templates/health-configmap.yaml +++ b/charts/bitnami/redis/templates/health-configmap.yaml @@ -8,10 +8,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-health" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/master/application.yaml b/charts/bitnami/redis/templates/master/application.yaml index 183eb74d4..d4e746151 100644 --- a/charts/bitnami/redis/templates/master/application.yaml +++ b/charts/bitnami/redis/templates/master/application.yaml @@ -9,18 +9,16 @@ kind: {{ .Values.master.kind }} metadata: name: {{ printf "%s-master" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.master.count }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: master {{- if (eq .Values.master.kind "StatefulSet") }} serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} @@ -37,14 +35,8 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: master - {{- if .Values.master.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} {{- end }} @@ -78,8 +70,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.master.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.master.nodeAffinityPreset.type "key" .Values.master.nodeAffinityPreset.key "values" .Values.master.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.master.nodeSelector }} @@ -505,11 +497,9 @@ spec: kind: PersistentVolumeClaim metadata: name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.master.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: master - {{- if .Values.master.persistence.labels }} - {{- toYaml .Values.master.persistence.labels | nindent 10 }} - {{- end }} {{- if .Values.master.persistence.annotations }} annotations: {{- toYaml .Values.master.persistence.annotations | nindent 10 }} {{- end }} diff --git a/charts/bitnami/redis/templates/master/psp.yaml b/charts/bitnami/redis/templates/master/psp.yaml index fa363664a..0809c902a 100644 --- a/charts/bitnami/redis/templates/master/psp.yaml +++ b/charts/bitnami/redis/templates/master/psp.yaml @@ -10,10 +10,7 @@ kind: PodSecurityPolicy metadata: name: {{ printf "%s-master" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/master/pvc.yaml b/charts/bitnami/redis/templates/master/pvc.yaml index bbacb5959..f5ee385a8 100644 --- a/charts/bitnami/redis/templates/master/pvc.yaml +++ b/charts/bitnami/redis/templates/master/pvc.yaml @@ -9,11 +9,9 @@ apiVersion: v1 metadata: name: {{ printf "redis-data-%s-master" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $labels := merge .Values.master.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.master.persistence.labels }} - {{- toYaml .Values.master.persistence.labels | nindent 4 }} - {{- end }} {{- if .Values.master.persistence.annotations }} annotations: {{- toYaml .Values.master.persistence.annotations | nindent 4 }} {{- end }} diff --git a/charts/bitnami/redis/templates/master/service.yaml b/charts/bitnami/redis/templates/master/service.yaml index b4a5c98a1..144cf9131 100644 --- a/charts/bitnami/redis/templates/master/service.yaml +++ b/charts/bitnami/redis/templates/master/service.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-master" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.master.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.master.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.master.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.master.service.type }} @@ -61,6 +53,7 @@ spec: {{- if .Values.master.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.master.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master {{- end }} diff --git a/charts/bitnami/redis/templates/master/serviceaccount.yaml b/charts/bitnami/redis/templates/master/serviceaccount.yaml index bab1ab167..2b0d749b9 100644 --- a/charts/bitnami/redis/templates/master/serviceaccount.yaml +++ b/charts/bitnami/redis/templates/master/serviceaccount.yaml @@ -10,17 +10,9 @@ automountServiceAccountToken: {{ .Values.master.serviceAccount.automountServiceA metadata: name: {{ template "redis.masterServiceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.master.serviceAccount.annotations }} - annotations: - {{- if or .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.master.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.master.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.master.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- end }} diff --git a/charts/bitnami/redis/templates/metrics-svc.yaml b/charts/bitnami/redis/templates/metrics-svc.yaml index b05f8a992..7fd7f36e0 100644 --- a/charts/bitnami/redis/templates/metrics-svc.yaml +++ b/charts/bitnami/redis/templates/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.metrics.service.type }} @@ -45,5 +37,5 @@ spec: {{- if .Values.metrics.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/redis/templates/networkpolicy.yaml b/charts/bitnami/redis/templates/networkpolicy.yaml index 35dd7c199..41d9b559b 100644 --- a/charts/bitnami/redis/templates/networkpolicy.yaml +++ b/charts/bitnami/redis/templates/networkpolicy.yaml @@ -9,16 +9,13 @@ apiVersion: {{ template "networkPolicy.apiVersion" . }} metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} policyTypes: - Ingress {{- if or (eq .Values.architecture "replication") .Values.networkPolicy.extraEgress }} @@ -37,7 +34,7 @@ spec: {{- end }} to: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- end }} {{- if .Values.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.networkPolicy.extraEgress "context" $ ) | nindent 4 }} @@ -56,7 +53,7 @@ spec: matchLabels: {{ template "common.names.fullname" . }}-client: "true" - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if or .Values.networkPolicy.ingressNSMatchLabels .Values.networkPolicy.ingressNSPodMatchLabels }} - namespaceSelector: matchLabels: diff --git a/charts/bitnami/redis/templates/pdb.yaml b/charts/bitnami/redis/templates/pdb.yaml index 7a4913c70..3306a8ce6 100644 --- a/charts/bitnami/redis/templates/pdb.yaml +++ b/charts/bitnami/redis/templates/pdb.yaml @@ -9,10 +9,7 @@ kind: PodDisruptionBudget metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -24,5 +21,5 @@ spec: maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/redis/templates/prometheusrule.yaml b/charts/bitnami/redis/templates/prometheusrule.yaml index ee77af591..73c89e652 100644 --- a/charts/bitnami/redis/templates/prometheusrule.yaml +++ b/charts/bitnami/redis/templates/prometheusrule.yaml @@ -9,13 +9,10 @@ kind: PrometheusRule metadata: name: {{ template "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/redis/templates/replicas/hpa.yaml b/charts/bitnami/redis/templates/replicas/hpa.yaml index 0141d4e29..37ecc8310 100644 --- a/charts/bitnami/redis/templates/replicas/hpa.yaml +++ b/charts/bitnami/redis/templates/replicas/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/redis/templates/replicas/service.yaml b/charts/bitnami/redis/templates/replicas/service.yaml index c6fd26263..7a0e070ed 100644 --- a/charts/bitnami/redis/templates/replicas/service.yaml +++ b/charts/bitnami/redis/templates/replicas/service.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.replica.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.replica.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.replica.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.replica.service.type }} @@ -58,6 +50,7 @@ spec: {{- if .Values.replica.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.replica.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.replica.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: replica {{- end }} diff --git a/charts/bitnami/redis/templates/replicas/serviceaccount.yaml b/charts/bitnami/redis/templates/replicas/serviceaccount.yaml index 107868856..695115071 100644 --- a/charts/bitnami/redis/templates/replicas/serviceaccount.yaml +++ b/charts/bitnami/redis/templates/replicas/serviceaccount.yaml @@ -10,17 +10,9 @@ automountServiceAccountToken: {{ .Values.replica.serviceAccount.automountService metadata: name: {{ template "redis.replicaServiceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.replica.serviceAccount.annotations }} - annotations: - {{- if or .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.replica.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.replica.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.replica.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- end }} diff --git a/charts/bitnami/redis/templates/replicas/statefulset.yaml b/charts/bitnami/redis/templates/replicas/statefulset.yaml index a71474b3b..ac910178f 100644 --- a/charts/bitnami/redis/templates/replicas/statefulset.yaml +++ b/charts/bitnami/redis/templates/replicas/statefulset.yaml @@ -9,11 +9,8 @@ kind: StatefulSet metadata: name: {{ printf "%s-replicas" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -21,8 +18,9 @@ spec: {{- if not .Values.replica.autoscaling.enabled }} replicas: {{ .Values.replica.replicaCount }} {{- end }} + {{- $podLabels := merge .Values.replica.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: replica serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} {{- if .Values.replica.updateStrategy }} @@ -36,14 +34,8 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: replica - {{- if .Values.replica.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} {{- end }} @@ -77,8 +69,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.replica.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "replica" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "replica" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "replica" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "replica" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.replica.nodeAffinityPreset.type "key" .Values.replica.nodeAffinityPreset.key "values" .Values.replica.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.replica.nodeSelector }} @@ -502,11 +494,9 @@ spec: kind: PersistentVolumeClaim metadata: name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.master.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: replica - {{- if .Values.replica.persistence.labels }} - {{- toYaml .Values.replica.persistence.labels | nindent 10 }} - {{- end }} {{- if .Values.replica.persistence.annotations }} annotations: {{- toYaml .Values.replica.persistence.annotations | nindent 10 }} {{- end }} diff --git a/charts/bitnami/redis/templates/role.yaml b/charts/bitnami/redis/templates/role.yaml index 9e97d52ca..914e500ff 100644 --- a/charts/bitnami/redis/templates/role.yaml +++ b/charts/bitnami/redis/templates/role.yaml @@ -9,10 +9,7 @@ kind: Role metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/rolebinding.yaml b/charts/bitnami/redis/templates/rolebinding.yaml index 05e99544c..7a1043e1a 100644 --- a/charts/bitnami/redis/templates/rolebinding.yaml +++ b/charts/bitnami/redis/templates/rolebinding.yaml @@ -9,10 +9,7 @@ kind: RoleBinding metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/scripts-configmap.yaml b/charts/bitnami/redis/templates/scripts-configmap.yaml index a7d2f4f4c..458476558 100644 --- a/charts/bitnami/redis/templates/scripts-configmap.yaml +++ b/charts/bitnami/redis/templates/scripts-configmap.yaml @@ -8,10 +8,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/secret-svcbind.yaml b/charts/bitnami/redis/templates/secret-svcbind.yaml index 25e1d01c0..e9ad541a2 100644 --- a/charts/bitnami/redis/templates/secret-svcbind.yaml +++ b/charts/bitnami/redis/templates/secret-svcbind.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/redis/templates/secret.yaml b/charts/bitnami/redis/templates/secret.yaml index 97bf711b1..1838c7d4b 100644 --- a/charts/bitnami/redis/templates/secret.yaml +++ b/charts/bitnami/redis/templates/secret.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.secretAnnotations .Values.commonAnnotations }} annotations: {{- if .Values.secretAnnotations }} diff --git a/charts/bitnami/redis/templates/sentinel/hpa.yaml b/charts/bitnami/redis/templates/sentinel/hpa.yaml index da47c9a12..80859c00c 100644 --- a/charts/bitnami/redis/templates/sentinel/hpa.yaml +++ b/charts/bitnami/redis/templates/sentinel/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ printf "%s-node" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: replica - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/redis/templates/sentinel/node-services.yaml b/charts/bitnami/redis/templates/sentinel/node-services.yaml index 62d664b09..924ee39ac 100644 --- a/charts/bitnami/redis/templates/sentinel/node-services.yaml +++ b/charts/bitnami/redis/templates/sentinel/node-services.yaml @@ -21,19 +21,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" $ }}-node-{{ $i }} namespace: {{ $.Release.Namespace | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: node - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or $.Values.sentinel.service.annotations $.Values.commonAnnotations }} - annotations: - {{- if $.Values.sentinel.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.sentinel.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if $.Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or $.Values.commonAnnotations $.Values.sentinel.service.annotations }} + {{- $annotations := merge $.Values.sentinel.service.annotations $.Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: NodePort diff --git a/charts/bitnami/redis/templates/sentinel/ports-configmap.yaml b/charts/bitnami/redis/templates/sentinel/ports-configmap.yaml index 27a1be7f6..1c0771a41 100644 --- a/charts/bitnami/redis/templates/sentinel/ports-configmap.yaml +++ b/charts/bitnami/redis/templates/sentinel/ports-configmap.yaml @@ -72,10 +72,7 @@ kind: ConfigMap metadata: name: {{ template "common.names.fullname" . }}-ports-configmap namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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/bitnami/redis/templates/sentinel/service.yaml b/charts/bitnami/redis/templates/sentinel/service.yaml index 5555a0de5..1a8631b20 100644 --- a/charts/bitnami/redis/templates/sentinel/service.yaml +++ b/charts/bitnami/redis/templates/sentinel/service.yaml @@ -20,19 +20,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.sentinel.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.sentinel.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.sentinel.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.sentinel.service.type }} @@ -102,7 +94,8 @@ spec: {{- if .Values.sentinel.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.sentinel.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.replica.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: node {{- end }} {{- end }} diff --git a/charts/bitnami/redis/templates/sentinel/statefulset.yaml b/charts/bitnami/redis/templates/sentinel/statefulset.yaml index 9a222a70e..f8fe6448b 100644 --- a/charts/bitnami/redis/templates/sentinel/statefulset.yaml +++ b/charts/bitnami/redis/templates/sentinel/statefulset.yaml @@ -10,24 +10,17 @@ kind: StatefulSet metadata: name: {{ printf "%s-node" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.sentinel.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.sentinel.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.sentinel.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.sentinel.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.replica.replicaCount }} + {{- $podLabels := merge .Values.replica.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: node serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) }} {{- if .Values.replica.updateStrategy }} @@ -41,14 +34,8 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: node - {{- if .Values.replica.podLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.replica.podLabels "context" $ ) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.podLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podLabels "context" $ ) | nindent 8 }} {{- end }} @@ -82,8 +69,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.replica.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "node" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "node" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAffinityPreset "component" "node" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.replica.podAntiAffinityPreset "component" "node" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.replica.nodeAffinityPreset.type "key" .Values.replica.nodeAffinityPreset.key "values" .Values.replica.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.replica.nodeSelector }} @@ -743,7 +730,7 @@ spec: volumeClaimTemplates: - metadata: name: redis-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: node {{- if .Values.replica.persistence.annotations }} annotations: {{- toYaml .Values.replica.persistence.annotations | nindent 10 }} @@ -763,11 +750,9 @@ spec: {{- if .Values.sentinel.persistence.enabled }} - metadata: name: sentinel-data - labels: {{- include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.sentinel.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: node - {{- if .Values.sentinel.persistence.labels }} - {{- toYaml .Values.sentinel.persistence.labels | nindent 4 }} - {{- end }} {{- if .Values.sentinel.persistence.annotations }} annotations: {{- toYaml .Values.sentinel.persistence.annotations | nindent 10 }} {{- end }} diff --git a/charts/bitnami/redis/templates/serviceaccount.yaml b/charts/bitnami/redis/templates/serviceaccount.yaml index da3c1b246..74f8f6524 100644 --- a/charts/bitnami/redis/templates/serviceaccount.yaml +++ b/charts/bitnami/redis/templates/serviceaccount.yaml @@ -10,17 +10,9 @@ automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountT metadata: name: {{ template "redis.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.commonAnnotations .Values.serviceAccount.annotations }} - annotations: - {{- if or .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/charts/bitnami/redis/templates/servicemonitor.yaml b/charts/bitnami/redis/templates/servicemonitor.yaml index 732ffbac9..ee925afc5 100644 --- a/charts/bitnami/redis/templates/servicemonitor.yaml +++ b/charts/bitnami/redis/templates/servicemonitor.yaml @@ -9,13 +9,10 @@ kind: ServiceMonitor metadata: name: {{ template "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.metrics.serviceMonitor.additionalLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $) | nindent 4 }} {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -50,6 +47,6 @@ spec: matchNames: - {{ .Release.Namespace }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics {{- end }} diff --git a/charts/bitnami/redis/templates/tls-secret.yaml b/charts/bitnami/redis/templates/tls-secret.yaml index 1ae75ca4a..b1f7153e1 100644 --- a/charts/bitnami/redis/templates/tls-secret.yaml +++ b/charts/bitnami/redis/templates/tls-secret.yaml @@ -19,10 +19,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/spark/Chart.lock b/charts/bitnami/spark/Chart.lock index d1e0f8b0d..256da0291 100644 --- a/charts/bitnami/spark/Chart.lock +++ b/charts/bitnami/spark/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-17T19:38:36.518884004Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T15:11:41.684754939Z" diff --git a/charts/bitnami/spark/Chart.yaml b/charts/bitnami/spark/Chart.yaml index 14144506c..1c2d8e284 100644 --- a/charts/bitnami/spark/Chart.yaml +++ b/charts/bitnami/spark/Chart.yaml @@ -6,7 +6,7 @@ annotations: category: Infrastructure images: | - name: spark - image: docker.io/bitnami/spark:3.4.1-debian-11-r45 + image: docker.io/bitnami/spark:3.4.1-debian-11-r48 licenses: Apache-2.0 apiVersion: v2 appVersion: 3.4.1 @@ -30,4 +30,4 @@ maintainers: name: spark sources: - https://github.com/bitnami/charts/tree/main/bitnami/spark -version: 7.1.3 +version: 7.1.5 diff --git a/charts/bitnami/spark/README.md b/charts/bitnami/spark/README.md index 1b23d4ad5..e11615cbb 100644 --- a/charts/bitnami/spark/README.md +++ b/charts/bitnami/spark/README.md @@ -86,7 +86,7 @@ The command removes all the Kubernetes components associated with the chart and | ------------------- | ----------------------------------------------------------------------------------------------------- | --------------------- | | `image.registry` | Spark image registry | `docker.io` | | `image.repository` | Spark image repository | `bitnami/spark` | -| `image.tag` | Spark image tag (immutable tags are recommended) | `3.4.1-debian-11-r45` | +| `image.tag` | Spark image tag (immutable tags are recommended) | `3.4.1-debian-11-r48` | | `image.digest` | Spark image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | | `image.pullPolicy` | Spark image pull policy | `IfNotPresent` | | `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` | diff --git a/charts/bitnami/spark/charts/common/Chart.yaml b/charts/bitnami/spark/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/spark/charts/common/Chart.yaml +++ b/charts/bitnami/spark/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/spark/charts/common/README.md b/charts/bitnami/spark/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/spark/charts/common/README.md +++ b/charts/bitnami/spark/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/spark/charts/common/templates/_affinities.tpl b/charts/bitnami/spark/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/spark/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/spark/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/spark/charts/common/templates/_labels.tpl b/charts/bitnami/spark/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/spark/charts/common/templates/_labels.tpl +++ b/charts/bitnami/spark/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/spark/values.yaml b/charts/bitnami/spark/values.yaml index c77a458db..f60824e16 100644 --- a/charts/bitnami/spark/values.yaml +++ b/charts/bitnami/spark/values.yaml @@ -95,7 +95,7 @@ diagnosticMode: image: registry: docker.io repository: bitnami/spark - tag: 3.4.1-debian-11-r45 + tag: 3.4.1-debian-11-r48 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' diff --git a/charts/bitnami/tomcat/Chart.lock b/charts/bitnami/tomcat/Chart.lock index 39bd18ce0..a6968b851 100644 --- a/charts/bitnami/tomcat/Chart.lock +++ b/charts/bitnami/tomcat/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-09T13:53:35.232742904Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:34:01.719209+02:00" diff --git a/charts/bitnami/tomcat/Chart.yaml b/charts/bitnami/tomcat/Chart.yaml index af9c0282d..6c1ac96ce 100644 --- a/charts/bitnami/tomcat/Chart.yaml +++ b/charts/bitnami/tomcat/Chart.yaml @@ -38,4 +38,4 @@ maintainers: name: tomcat sources: - https://github.com/bitnami/charts/tree/main/bitnami/tomcat -version: 10.9.10 +version: 10.10.0 diff --git a/charts/bitnami/tomcat/charts/common/Chart.yaml b/charts/bitnami/tomcat/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/tomcat/charts/common/Chart.yaml +++ b/charts/bitnami/tomcat/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/tomcat/charts/common/README.md b/charts/bitnami/tomcat/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/tomcat/charts/common/README.md +++ b/charts/bitnami/tomcat/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/tomcat/charts/common/templates/_affinities.tpl b/charts/bitnami/tomcat/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/tomcat/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/tomcat/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/tomcat/charts/common/templates/_labels.tpl b/charts/bitnami/tomcat/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/tomcat/charts/common/templates/_labels.tpl +++ b/charts/bitnami/tomcat/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/tomcat/templates/_pod.tpl b/charts/bitnami/tomcat/templates/_pod.tpl index 318bb711c..d083b3a81 100644 --- a/charts/bitnami/tomcat/templates/_pod.tpl +++ b/charts/bitnami/tomcat/templates/_pod.tpl @@ -14,9 +14,10 @@ hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAli {{- if .Values.affinity }} affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 2 }} {{- else }} +{{- $podLabels := merge .Values.podLabels .Values.commonLabels }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 4 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 4 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 4 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 4 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 4 }} {{- end }} {{- if .Values.schedulerName }} diff --git a/charts/bitnami/tomcat/templates/deployment.yaml b/charts/bitnami/tomcat/templates/deployment.yaml index 1fbcf1615..b244d3083 100644 --- a/charts/bitnami/tomcat/templates/deployment.yaml +++ b/charts/bitnami/tomcat/templates/deployment.yaml @@ -9,24 +9,19 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: replicas: {{ .Values.replicaCount }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} strategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} {{- if .Values.podAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/ingress.yaml b/charts/bitnami/tomcat/templates/ingress.yaml index ca1bd4ef2..d7aeaec7c 100644 --- a/charts/bitnami/tomcat/templates/ingress.yaml +++ b/charts/bitnami/tomcat/templates/ingress.yaml @@ -9,20 +9,15 @@ kind: Ingress metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.ingress.annotations .Values.commonAnnotations .Values.ingress.certManager }} annotations: {{- if .Values.ingress.certManager }} kubernetes.io/tls-acme: "true" {{- end }} - {{- if .Values.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.ingress.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingress.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- end }} spec: diff --git a/charts/bitnami/tomcat/templates/jmx-configmap.yaml b/charts/bitnami/tomcat/templates/jmx-configmap.yaml index 53d2d4b52..7ddf0e70a 100644 --- a/charts/bitnami/tomcat/templates/jmx-configmap.yaml +++ b/charts/bitnami/tomcat/templates/jmx-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ template "tomcat.fullname" . }}-jmx-configuration namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/networkpolicy.yaml b/charts/bitnami/tomcat/templates/networkpolicy.yaml index dd6dd7205..adc89a222 100644 --- a/charts/bitnami/tomcat/templates/networkpolicy.yaml +++ b/charts/bitnami/tomcat/templates/networkpolicy.yaml @@ -8,18 +8,15 @@ kind: NetworkPolicy apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "common.names.fullname" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} namespace: {{ .Release.Namespace }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} ingress: # Allow inbound connections - ports: {{- include "tomcat.ports" . | nindent 8 }} @@ -34,8 +31,7 @@ spec: {{- end }} # Allow communication between Tomcat's POD - podSelector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} {{- if .Values.metrics.jmx.enabled }} # Allow prometheus scrapes diff --git a/charts/bitnami/tomcat/templates/podmonitor.yaml b/charts/bitnami/tomcat/templates/podmonitor.yaml index 710ec6b51..e9b5e4483 100644 --- a/charts/bitnami/tomcat/templates/podmonitor.yaml +++ b/charts/bitnami/tomcat/templates/podmonitor.yaml @@ -9,10 +9,7 @@ kind: PodMonitor metadata: name: {{ template "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.podMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.metrics.podMonitor.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.podMonitor.additionalLabels "context" $ ) | nindent 4 }} {{- end }} @@ -40,7 +37,7 @@ spec: namespaceSelector: matchNames: - {{ .Release.Namespace }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/prometheusrule.yaml b/charts/bitnami/tomcat/templates/prometheusrule.yaml index 67211f1a0..09b4f60d0 100644 --- a/charts/bitnami/tomcat/templates/prometheusrule.yaml +++ b/charts/bitnami/tomcat/templates/prometheusrule.yaml @@ -9,10 +9,7 @@ kind: PrometheusRule metadata: name: {{ template "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/pvc.yaml b/charts/bitnami/tomcat/templates/pvc.yaml index a64e20b43..c929bf26c 100644 --- a/charts/bitnami/tomcat/templates/pvc.yaml +++ b/charts/bitnami/tomcat/templates/pvc.yaml @@ -9,10 +9,7 @@ apiVersion: v1 metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/secrets.yaml b/charts/bitnami/tomcat/templates/secrets.yaml index 94b1f1c0f..16784b160 100644 --- a/charts/bitnami/tomcat/templates/secrets.yaml +++ b/charts/bitnami/tomcat/templates/secrets.yaml @@ -8,10 +8,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/statefulset.yaml b/charts/bitnami/tomcat/templates/statefulset.yaml index 3aa76a99f..a0cddeb85 100644 --- a/charts/bitnami/tomcat/templates/statefulset.yaml +++ b/charts/bitnami/tomcat/templates/statefulset.yaml @@ -9,10 +9,7 @@ kind: StatefulSet metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -21,16 +18,14 @@ spec: {{- if .Values.podManagementPolicy }} podManagementPolicy: {{ .Values.podManagementPolicy }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} updateStrategy: {{- include "common.tplvalues.render" (dict "value" .Values.updateStrategy "context" $ ) | nindent 4 }} serviceName: {{ template "common.names.fullname" . }}-headless template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} {{- if .Values.podAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/svc-headless.yaml b/charts/bitnami/tomcat/templates/svc-headless.yaml index 86861be9a..327144896 100644 --- a/charts/bitnami/tomcat/templates/svc-headless.yaml +++ b/charts/bitnami/tomcat/templates/svc-headless.yaml @@ -9,21 +9,14 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }}-headless namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.headless.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.headless.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: clusterIP: None type: ClusterIP - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/tomcat/templates/svc.yaml b/charts/bitnami/tomcat/templates/svc.yaml index c3c5d3530..620ffac94 100644 --- a/charts/bitnami/tomcat/templates/svc.yaml +++ b/charts/bitnami/tomcat/templates/svc.yaml @@ -8,18 +8,10 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -53,4 +45,5 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/tomcat/templates/tls-secrets.yaml b/charts/bitnami/tomcat/templates/tls-secrets.yaml index 7d963ea12..72f6eb7ab 100644 --- a/charts/bitnami/tomcat/templates/tls-secrets.yaml +++ b/charts/bitnami/tomcat/templates/tls-secrets.yaml @@ -11,12 +11,9 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ $.Release.Namespace | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} type: kubernetes.io/tls data: @@ -34,10 +31,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/Chart.lock b/charts/bitnami/wordpress/Chart.lock index bf70987a2..103d2831c 100644 --- a/charts/bitnami/wordpress/Chart.lock +++ b/charts/bitnami/wordpress/Chart.lock @@ -1,12 +1,12 @@ dependencies: - name: memcached repository: oci://registry-1.docker.io/bitnamicharts - version: 6.5.9 + version: 6.6.0 - name: mariadb repository: oci://registry-1.docker.io/bitnamicharts - version: 13.0.5 + version: 13.1.0 - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:6d8114477c1c554724e66c4d40fe720c9294cfec53f0a342c6954499173fe59f -generated: "2023-08-21T06:48:20.61529583Z" + version: 2.9.0 +digest: sha256:19433d22b87927464569967e128b716709f4b8e8c99e59c5b6d00b6c61ed98f4 +generated: "2023-08-23T12:48:27.768104+02:00" diff --git a/charts/bitnami/wordpress/Chart.yaml b/charts/bitnami/wordpress/Chart.yaml index 651b8a853..8237011be 100644 --- a/charts/bitnami/wordpress/Chart.yaml +++ b/charts/bitnami/wordpress/Chart.yaml @@ -6,11 +6,11 @@ annotations: category: CMS images: | - name: apache-exporter - image: docker.io/bitnami/apache-exporter:1.0.1-debian-11-r21 + image: docker.io/bitnami/apache-exporter:1.0.1-debian-11-r23 - name: os-shell - image: docker.io/bitnami/os-shell:11-debian-11-r43 + image: docker.io/bitnami/os-shell:11-debian-11-r45 - name: wordpress - image: docker.io/bitnami/wordpress:6.3.0-debian-11-r9 + image: docker.io/bitnami/wordpress:6.3.0-debian-11-r13 licenses: Apache-2.0 apiVersion: v2 appVersion: 6.3.0 @@ -47,4 +47,4 @@ maintainers: name: wordpress sources: - https://github.com/bitnami/charts/tree/main/bitnami/wordpress -version: 17.0.8 +version: 17.1.2 diff --git a/charts/bitnami/wordpress/README.md b/charts/bitnami/wordpress/README.md index 46ebccf76..86919cab6 100644 --- a/charts/bitnami/wordpress/README.md +++ b/charts/bitnami/wordpress/README.md @@ -78,15 +78,15 @@ The command removes all the Kubernetes components associated with the chart and ### WordPress Image parameters -| Name | Description | Value | -| ------------------- | --------------------------------------------------------------------------------------------------------- | -------------------- | -| `image.registry` | WordPress image registry | `docker.io` | -| `image.repository` | WordPress image repository | `bitnami/wordpress` | -| `image.tag` | WordPress image tag (immutable tags are recommended) | `6.3.0-debian-11-r9` | -| `image.digest` | WordPress image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | -| `image.pullPolicy` | WordPress image pull policy | `IfNotPresent` | -| `image.pullSecrets` | WordPress image pull secrets | `[]` | -| `image.debug` | Specify if debug values should be set | `false` | +| Name | Description | Value | +| ------------------- | --------------------------------------------------------------------------------------------------------- | --------------------- | +| `image.registry` | WordPress image registry | `docker.io` | +| `image.repository` | WordPress image repository | `bitnami/wordpress` | +| `image.tag` | WordPress image tag (immutable tags are recommended) | `6.3.0-debian-11-r13` | +| `image.digest` | WordPress image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | +| `image.pullPolicy` | WordPress image pull policy | `IfNotPresent` | +| `image.pullSecrets` | WordPress image pull secrets | `[]` | +| `image.debug` | Specify if debug values should be set | `false` | ### WordPress Configuration parameters @@ -249,7 +249,7 @@ The command removes all the Kubernetes components associated with the chart and | `volumePermissions.enabled` | Enable init container that changes the owner/group of the PV mount point to `runAsUser:fsGroup` | `false` | | `volumePermissions.image.registry` | OS Shell + Utility image registry | `docker.io` | | `volumePermissions.image.repository` | OS Shell + Utility image repository | `bitnami/os-shell` | -| `volumePermissions.image.tag` | OS Shell + Utility image tag (immutable tags are recommended) | `11-debian-11-r43` | +| `volumePermissions.image.tag` | OS Shell + Utility image tag (immutable tags are recommended) | `11-debian-11-r45` | | `volumePermissions.image.digest` | OS Shell + Utility image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | | `volumePermissions.image.pullPolicy` | OS Shell + Utility image pull policy | `IfNotPresent` | | `volumePermissions.image.pullSecrets` | OS Shell + Utility image pull secrets | `[]` | @@ -281,7 +281,7 @@ The command removes all the Kubernetes components associated with the chart and | `metrics.enabled` | Start a sidecar prometheus exporter to expose metrics | `false` | | `metrics.image.registry` | Apache exporter image registry | `docker.io` | | `metrics.image.repository` | Apache exporter image repository | `bitnami/apache-exporter` | -| `metrics.image.tag` | Apache exporter image tag (immutable tags are recommended) | `1.0.1-debian-11-r21` | +| `metrics.image.tag` | Apache exporter image tag (immutable tags are recommended) | `1.0.1-debian-11-r23` | | `metrics.image.digest` | Apache exporter image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `""` | | `metrics.image.pullPolicy` | Apache exporter image pull policy | `IfNotPresent` | | `metrics.image.pullSecrets` | Apache exporter image pull secrets | `[]` | diff --git a/charts/bitnami/wordpress/charts/common/Chart.yaml b/charts/bitnami/wordpress/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/wordpress/charts/common/Chart.yaml +++ b/charts/bitnami/wordpress/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/wordpress/charts/common/README.md b/charts/bitnami/wordpress/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/wordpress/charts/common/README.md +++ b/charts/bitnami/wordpress/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/wordpress/charts/common/templates/_affinities.tpl b/charts/bitnami/wordpress/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/wordpress/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/wordpress/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/common/templates/_labels.tpl b/charts/bitnami/wordpress/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/wordpress/charts/common/templates/_labels.tpl +++ b/charts/bitnami/wordpress/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/wordpress/charts/mariadb/Chart.lock b/charts/bitnami/wordpress/charts/mariadb/Chart.lock index 5d6bd06d4..14201b03a 100644 --- a/charts/bitnami/wordpress/charts/mariadb/Chart.lock +++ b/charts/bitnami/wordpress/charts/mariadb/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-11T09:32:02.90916554Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:14:34.796011+02:00" diff --git a/charts/bitnami/wordpress/charts/mariadb/Chart.yaml b/charts/bitnami/wordpress/charts/mariadb/Chart.yaml index c6223afd1..455d8d61a 100644 --- a/charts/bitnami/wordpress/charts/mariadb/Chart.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/Chart.yaml @@ -33,4 +33,4 @@ maintainers: name: mariadb sources: - https://github.com/bitnami/charts/tree/main/bitnami/mariadb -version: 13.0.5 +version: 13.1.0 diff --git a/charts/bitnami/wordpress/charts/mariadb/charts/common/Chart.yaml b/charts/bitnami/wordpress/charts/mariadb/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/wordpress/charts/mariadb/charts/common/Chart.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/wordpress/charts/mariadb/charts/common/README.md b/charts/bitnami/wordpress/charts/mariadb/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/wordpress/charts/mariadb/charts/common/README.md +++ b/charts/bitnami/wordpress/charts/mariadb/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_affinities.tpl b/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_labels.tpl b/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_labels.tpl +++ b/charts/bitnami/wordpress/charts/mariadb/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/networkpolicy-egress.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/networkpolicy-egress.yaml index dc8991a4f..64af059fa 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/networkpolicy-egress.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/networkpolicy-egress.yaml @@ -9,17 +9,13 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-egress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: podSelector: - matchLabels: - {{- include "common.labels.standard" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} policyTypes: - Egress egress: diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/configmap.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/configmap.yaml index a24d25a06..55ed4414e 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/configmap.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/initialization-configmap.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/initialization-configmap.yaml index a9fe7ad80..e4f5b108a 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/initialization-configmap.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/initialization-configmap.yaml @@ -9,8 +9,11 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "mariadb.primary.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- end }} data: {{- include "common.tplvalues.render" (dict "value" .Values.initdbScripts "context" .) | nindent 2 }} {{ end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/networkpolicy-ingress.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/networkpolicy-ingress.yaml index 446de4d63..318a11943 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/networkpolicy-ingress.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/networkpolicy-ingress.yaml @@ -9,18 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $primaryPodLabels := merge .Values.primary.podLabels .Values.commonLabels }} podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $primaryPodLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary - {{- include "common.labels.standard" . | nindent 6 }} ingress: {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} - from: @@ -50,10 +47,10 @@ spec: {{- end }} {{- if and .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.enabled (eq .Values.architecture "replication") }} - from: + {{- $secondaryPodLabels := merge .Values.secondary.podLabels .Values.commonLabels }} - podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $secondaryPodLabels "context" $ ) | nindent 14 }} app.kubernetes.io/component: secondary - {{- include "common.labels.standard" . | nindent 14 }} {{- end }} {{- if .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules }} {{- include "common.tplvalues.render" (dict "value" .Values.networkPolicy.ingressRules.primaryAccessOnlyFrom.customRules "context" $) | nindent 4 }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/pdb.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/pdb.yaml index 21ed6cac0..0a9b21c71 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/pdb.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.primary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.primary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/statefulset.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/statefulset.yaml index 0adbef16e..ee6ab57ad 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/statefulset.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/statefulset.yaml @@ -8,19 +8,17 @@ kind: StatefulSet metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: 1 revisionHistoryLimit: {{ .Values.primary.revisionHistoryLimit }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: primary serviceName: {{ include "mariadb.primary.fullname" . }} {{- if .Values.primary.updateStrategy }} @@ -35,14 +33,8 @@ spec: {{- if .Values.primary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: primary - {{- if .Values.primary.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.primary.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} spec: {{- include "mariadb.imagePullSecrets" . | nindent 6 }} {{- if .Values.primary.hostAliases }} @@ -56,8 +48,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.primary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.primary.podAntiAffinityPreset "component" "primary" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.primary.nodeAffinityPreset.type "key" .Values.primary.nodeAffinityPreset.key "values" .Values.primary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.primary.nodeSelector }} @@ -379,14 +371,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.primary.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: primary {{- if .Values.primary.persistence.annotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.primary.persistence.annotations "context" $ ) | nindent 10 }} {{- end }} - {{- if .Values.primary.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }} - {{- end }} spec: accessModes: {{- range .Values.primary.persistence.accessModes }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/primary/svc.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/primary/svc.yaml index a12025eff..f0066aa70 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/primary/svc.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/primary/svc.yaml @@ -8,17 +8,12 @@ kind: Service metadata: name: {{ include "mariadb.primary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.primary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.primary.service.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.primary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.primary.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }} @@ -62,5 +57,6 @@ spec: {{- if .Values.primary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.primary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.primary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: primary diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/prometheusrules.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/prometheusrules.yaml index 29eb87709..84927a269 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/prometheusrules.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/prometheusrules.yaml @@ -8,16 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.prometheusRule.namespace }} - namespace: {{ .Values.metrics.prometheusRule.namespace }} - {{- else }} - namespace: {{ .Release.Namespace | quote }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/role.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/role.yaml index 4d53ccecf..42ea25315 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/role.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/role.yaml @@ -9,10 +9,7 @@ kind: Role metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/rolebinding.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/rolebinding.yaml index f831afa9b..07b950682 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/rolebinding.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/rolebinding.yaml @@ -9,10 +9,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/configmap.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/configmap.yaml index 0129c97cc..8a9599144 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/configmap.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/networkpolicy-ingress.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/networkpolicy-ingress.yaml index e715c5d22..a0d4cf321 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/networkpolicy-ingress.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/networkpolicy-ingress.yaml @@ -9,18 +9,15 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress-secondary" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $secondaryPodLabels := merge .Values.secondary.podLabels .Values.commonLabels }} podSelector: - matchLabels: + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $secondaryPodLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary - {{- include "common.labels.standard" . | nindent 6 }} ingress: {{- if and .Values.metrics.enabled .Values.networkPolicy.metrics.enabled (or .Values.networkPolicy.metrics.namespaceSelector .Values.networkPolicy.metrics.podSelector) }} - from: diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/pdb.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/pdb.yaml index 2f91d7311..d4163f19e 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/pdb.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -24,7 +21,8 @@ spec: {{- if .Values.secondary.pdb.maxUnavailable }} maxUnavailable: {{ .Values.secondary.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/statefulset.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/statefulset.yaml index 3eb9f63f2..b5ef7a795 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/statefulset.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/statefulset.yaml @@ -9,19 +9,17 @@ kind: StatefulSet metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.secondary.replicaCount }} revisionHistoryLimit: {{ .Values.secondary.revisionHistoryLimit }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: secondary serviceName: {{ include "mariadb.secondary.fullname" . }} podManagementPolicy: {{ .Values.secondary.podManagementPolicy }} @@ -37,14 +35,8 @@ spec: {{- if .Values.secondary.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: secondary - {{- if .Values.secondary.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.secondary.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} spec: {{- include "mariadb.imagePullSecrets" . | nindent 6 }} {{- if or .Values.secondary.schedulerName .Values.schedulerName }} @@ -58,8 +50,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.secondary.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "component" "secondary" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "component" "secondary" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.secondary.podAntiAffinityPreset "component" "secondary" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.secondary.nodeAffinityPreset.type "key" .Values.secondary.nodeAffinityPreset.key "values" .Values.secondary.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.secondary.nodeSelector }} @@ -349,14 +341,12 @@ spec: volumeClaimTemplates: - metadata: name: data - labels: {{ include "common.labels.matchLabels" . | nindent 10 }} + {{- $claimLabels := merge .Values.secondary.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} app.kubernetes.io/component: secondary {{- if .Values.secondary.persistence.annotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.persistence.annotations "context" $ ) | nindent 10 }} {{- end }} - {{- if .Values.primary.persistence.labels }} - labels: {{- include "common.tplvalues.render" (dict "value" .Values.primary.persistence.labels "context" $) | nindent 10 }} - {{- end }} spec: accessModes: {{- range .Values.secondary.persistence.accessModes }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/svc.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/svc.yaml index ca295c909..30388144c 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secondary/svc.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secondary/svc.yaml @@ -9,17 +9,12 @@ kind: Service metadata: name: {{ include "mariadb.secondary.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.secondary.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.secondary.service.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.secondary.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.secondary.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.metrics.enabled .Values.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.annotations "context" $ ) | nindent 4 }} @@ -63,6 +58,7 @@ spec: {{- if .Values.secondary.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.secondary.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{ include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.secondary.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: secondary {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/secrets.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/secrets.yaml index 223527635..3cd3dcfc6 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/secrets.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/secrets.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -55,10 +52,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-root namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -80,10 +74,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }}-svcbind-custom-user namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/serviceaccount.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/serviceaccount.yaml index 9945aa65a..eb00a4363 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/serviceaccount.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/serviceaccount.yaml @@ -9,16 +9,10 @@ kind: ServiceAccount metadata: name: {{ include "mariadb.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/mariadb/templates/servicemonitor.yaml b/charts/bitnami/wordpress/charts/mariadb/templates/servicemonitor.yaml index 6217f989e..3ab4bb68b 100644 --- a/charts/bitnami/wordpress/charts/mariadb/templates/servicemonitor.yaml +++ b/charts/bitnami/wordpress/charts/mariadb/templates/servicemonitor.yaml @@ -8,18 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace | quote }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }} - {{- end }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -46,7 +37,7 @@ spec: matchNames: - {{ .Release.Namespace | quote }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/Chart.lock b/charts/bitnami/wordpress/charts/memcached/Chart.lock index 78b398d7f..b2cf49223 100644 --- a/charts/bitnami/wordpress/charts/memcached/Chart.lock +++ b/charts/bitnami/wordpress/charts/memcached/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-17T14:04:35.235969503Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:15:31.449956+02:00" diff --git a/charts/bitnami/wordpress/charts/memcached/Chart.yaml b/charts/bitnami/wordpress/charts/memcached/Chart.yaml index f170f06cf..de195d06a 100644 --- a/charts/bitnami/wordpress/charts/memcached/Chart.yaml +++ b/charts/bitnami/wordpress/charts/memcached/Chart.yaml @@ -30,4 +30,4 @@ maintainers: name: memcached sources: - https://github.com/bitnami/charts/tree/main/bitnami/memcached -version: 6.5.9 +version: 6.6.0 diff --git a/charts/bitnami/wordpress/charts/memcached/charts/common/Chart.yaml b/charts/bitnami/wordpress/charts/memcached/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/wordpress/charts/memcached/charts/common/Chart.yaml +++ b/charts/bitnami/wordpress/charts/memcached/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/wordpress/charts/memcached/charts/common/README.md b/charts/bitnami/wordpress/charts/memcached/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/wordpress/charts/memcached/charts/common/README.md +++ b/charts/bitnami/wordpress/charts/memcached/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_affinities.tpl b/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_labels.tpl b/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_labels.tpl +++ b/charts/bitnami/wordpress/charts/memcached/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/deployment.yaml b/charts/bitnami/wordpress/charts/memcached/templates/deployment.yaml index bb3e5c433..14983e730 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/deployment.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/deployment.yaml @@ -9,26 +9,21 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} replicas: {{ .Values.replicaCount }} {{- if .Values.updateStrategy }} strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} annotations: {{- if .Values.auth.enabled }} checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} @@ -48,8 +43,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/hpa.yaml b/charts/bitnami/wordpress/charts/memcached/templates/hpa.yaml index 6832ba8d2..16f1e3b5b 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/hpa.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/hpa.yaml @@ -9,10 +9,7 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/metrics-svc.yaml b/charts/bitnami/wordpress/charts/memcached/templates/metrics-svc.yaml index 762d232ff..f3659141e 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/metrics-svc.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/metrics-svc.yaml @@ -9,18 +9,12 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: ClusterIP sessionAffinity: {{ .Values.metrics.service.sessionAffinity }} @@ -31,5 +25,6 @@ spec: - name: metrics port: {{ .Values.metrics.service.ports.metrics }} targetPort: metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/pdb.yaml b/charts/bitnami/wordpress/charts/memcached/templates/pdb.yaml index bde11be19..d1ad8dab5 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/pdb.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/pdb.yaml @@ -9,7 +9,10 @@ kind: PodDisruptionBudget metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + 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 }} + {{- end }} spec: {{- if .Values.pdb.minAvailable }} minAvailable: {{ .Values.pdb.minAvailable }} @@ -17,6 +20,7 @@ spec: {{- if .Values.pdb.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/secrets.yaml b/charts/bitnami/wordpress/charts/memcached/templates/secrets.yaml index b39c02a24..d989dab58 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/secrets.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/secrets.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/service.yaml b/charts/bitnami/wordpress/charts/memcached/templates/service.yaml index b7d0b97ea..b87b66de1 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/service.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/service.yaml @@ -8,17 +8,11 @@ kind: Service metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if .Values.service.sessionAffinity }} @@ -51,4 +45,5 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/serviceaccount.yaml b/charts/bitnami/wordpress/charts/memcached/templates/serviceaccount.yaml index 0399f39be..6c35024b0 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/serviceaccount.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/serviceaccount.yaml @@ -10,15 +10,9 @@ automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountT metadata: name: {{ template "memcached.serviceAccountName" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/servicemonitor.yaml b/charts/bitnami/wordpress/charts/memcached/templates/servicemonitor.yaml index 1dc7ebb58..2e1b78297 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/servicemonitor.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/servicemonitor.yaml @@ -8,18 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} + namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- end }} @@ -28,7 +19,7 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/wordpress/charts/memcached/templates/statefulset.yaml b/charts/bitnami/wordpress/charts/memcached/templates/statefulset.yaml index 10f086a49..c380fd130 100644 --- a/charts/bitnami/wordpress/charts/memcached/templates/statefulset.yaml +++ b/charts/bitnami/wordpress/charts/memcached/templates/statefulset.yaml @@ -9,16 +9,14 @@ kind: StatefulSet metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} replicas: {{ .Values.replicaCount }} {{- if .Values.podManagementPolicy }} podManagementPolicy: {{ .Values.podManagementPolicy | quote }} @@ -29,10 +27,7 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} annotations: {{- if .Values.auth.enabled }} checksum/secrets: {{ include (print $.Template.BasePath "/secrets.yaml") . | sha256sum }} @@ -52,8 +47,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} @@ -258,20 +253,12 @@ spec: volumeClaimTemplates: - metadata: name: data - annotations: - {{- if .Values.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} - labels: - {{- if .Values.persistence.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.persistence.labels "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} - {{- end }} + {{- $claimLabels := merge .Values.persistence.labels .Values.commonLabels }} + labels: {{- include "common.labels.matchLabels" ( dict "customLabels" $claimLabels "context" $ ) | nindent 10 }} + {{- if or .Values.persistence.annotations .Values.commonAnnotations }} + {{- $claimAnnotations := merge .Values.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $) | nindent 10 }} + {{- end }} spec: accessModes: {{- range .Values.persistence.accessModes }} diff --git a/charts/bitnami/wordpress/templates/config-secret.yaml b/charts/bitnami/wordpress/templates/config-secret.yaml index 090406036..9dff348ec 100644 --- a/charts/bitnami/wordpress/templates/config-secret.yaml +++ b/charts/bitnami/wordpress/templates/config-secret.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ printf "%s-configuration" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/deployment.yaml b/charts/bitnami/wordpress/templates/deployment.yaml index 0a3d1ac8c..c09d785be 100644 --- a/charts/bitnami/wordpress/templates/deployment.yaml +++ b/charts/bitnami/wordpress/templates/deployment.yaml @@ -8,16 +8,14 @@ kind: Deployment metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} {{- if .Values.updateStrategy }} strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} {{- end }} @@ -26,10 +24,7 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} {{- if or .Values.podAnnotations .Values.metrics.enabled (include "wordpress.createConfigSecret" .) }} annotations: {{- if .Values.podAnnotations }} @@ -53,8 +48,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} diff --git a/charts/bitnami/wordpress/templates/externaldb-secrets.yaml b/charts/bitnami/wordpress/templates/externaldb-secrets.yaml index 9f46e0ed8..ae5edb146 100644 --- a/charts/bitnami/wordpress/templates/externaldb-secrets.yaml +++ b/charts/bitnami/wordpress/templates/externaldb-secrets.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ printf "%s-externaldb" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/hpa.yaml b/charts/bitnami/wordpress/templates/hpa.yaml index 5afd8e8dd..2426dd273 100644 --- a/charts/bitnami/wordpress/templates/hpa.yaml +++ b/charts/bitnami/wordpress/templates/hpa.yaml @@ -9,10 +9,7 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/httpd-configmap.yaml b/charts/bitnami/wordpress/templates/httpd-configmap.yaml index 2126bc884..30a434af0 100644 --- a/charts/bitnami/wordpress/templates/httpd-configmap.yaml +++ b/charts/bitnami/wordpress/templates/httpd-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-apache-configuration" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/ingress.yaml b/charts/bitnami/wordpress/templates/ingress.yaml index bfa2d8d01..c51e9728c 100644 --- a/charts/bitnami/wordpress/templates/ingress.yaml +++ b/charts/bitnami/wordpress/templates/ingress.yaml @@ -9,17 +9,11 @@ kind: Ingress metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.ingress.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.ingress.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} ingressClassName: {{ .Values.ingress.ingressClassName | quote }} diff --git a/charts/bitnami/wordpress/templates/metrics-svc.yaml b/charts/bitnami/wordpress/templates/metrics-svc.yaml index 6c622607e..b78c6f726 100644 --- a/charts/bitnami/wordpress/templates/metrics-svc.yaml +++ b/charts/bitnami/wordpress/templates/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ printf "%s-metrics" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -30,5 +22,6 @@ spec: port: {{ .Values.metrics.service.ports.metrics }} protocol: TCP targetPort: metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/networkpolicy-backend-ingress.yaml b/charts/bitnami/wordpress/templates/networkpolicy-backend-ingress.yaml index 56df816f9..149fb8c9b 100644 --- a/charts/bitnami/wordpress/templates/networkpolicy-backend-ingress.yaml +++ b/charts/bitnami/wordpress/templates/networkpolicy-backend-ingress.yaml @@ -9,10 +9,7 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-backend" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -28,6 +25,6 @@ spec: ingress: - from: - podSelector: - matchLabels: - {{- include "common.labels.matchLabels" . | nindent 14 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/networkpolicy-egress.yaml b/charts/bitnami/wordpress/templates/networkpolicy-egress.yaml index 96750ce87..9c8a44225 100644 --- a/charts/bitnami/wordpress/templates/networkpolicy-egress.yaml +++ b/charts/bitnami/wordpress/templates/networkpolicy-egress.yaml @@ -9,10 +9,7 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-egress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/networkpolicy-ingress.yaml b/charts/bitnami/wordpress/templates/networkpolicy-ingress.yaml index fd96c64a0..b91bcb00d 100644 --- a/charts/bitnami/wordpress/templates/networkpolicy-ingress.yaml +++ b/charts/bitnami/wordpress/templates/networkpolicy-ingress.yaml @@ -9,17 +9,14 @@ kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "common.names.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: - {{- include "common.labels.standard" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} ingress: {{- if and .Values.ingress.enabled .Values.networkPolicy.ingress.enabled (or .Values.networkPolicy.ingress.namespaceSelector .Values.networkPolicy.ingress.podSelector) }} - from: diff --git a/charts/bitnami/wordpress/templates/pdb.yaml b/charts/bitnami/wordpress/templates/pdb.yaml index b6ddbc225..f7c1c9dc3 100644 --- a/charts/bitnami/wordpress/templates/pdb.yaml +++ b/charts/bitnami/wordpress/templates/pdb.yaml @@ -9,10 +9,7 @@ kind: PodDisruptionBudget metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -23,6 +20,7 @@ spec: {{- if .Values.pdb.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/postinit-configmap.yaml b/charts/bitnami/wordpress/templates/postinit-configmap.yaml index ec51435ed..515e60dc9 100644 --- a/charts/bitnami/wordpress/templates/postinit-configmap.yaml +++ b/charts/bitnami/wordpress/templates/postinit-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-postinit" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/pvc.yaml b/charts/bitnami/wordpress/templates/pvc.yaml index 9b465d8c8..9c3bf4122 100644 --- a/charts/bitnami/wordpress/templates/pvc.yaml +++ b/charts/bitnami/wordpress/templates/pvc.yaml @@ -9,18 +9,10 @@ apiVersion: v1 metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.persistence.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.persistence.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.persistence.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: accessModes: diff --git a/charts/bitnami/wordpress/templates/secrets.yaml b/charts/bitnami/wordpress/templates/secrets.yaml index 0e12db0fc..22e6a0495 100644 --- a/charts/bitnami/wordpress/templates/secrets.yaml +++ b/charts/bitnami/wordpress/templates/secrets.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/templates/serviceaccount.yaml b/charts/bitnami/wordpress/templates/serviceaccount.yaml index 119829202..b83e6c463 100644 --- a/charts/bitnami/wordpress/templates/serviceaccount.yaml +++ b/charts/bitnami/wordpress/templates/serviceaccount.yaml @@ -9,16 +9,10 @@ kind: ServiceAccount metadata: name: {{ include "wordpress.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/charts/bitnami/wordpress/templates/servicemonitor.yaml b/charts/bitnami/wordpress/templates/servicemonitor.yaml index 8fc1bb280..54f73d096 100644 --- a/charts/bitnami/wordpress/templates/servicemonitor.yaml +++ b/charts/bitnami/wordpress/templates/servicemonitor.yaml @@ -9,14 +9,9 @@ kind: ServiceMonitor metadata: name: {{ include "common.names.fullname" . }} namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.labels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -43,6 +38,6 @@ spec: matchNames: - {{ .Release.Namespace | quote }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: metrics {{- end }} diff --git a/charts/bitnami/wordpress/templates/svc.yaml b/charts/bitnami/wordpress/templates/svc.yaml index c95f1408b..af45db351 100644 --- a/charts/bitnami/wordpress/templates/svc.yaml +++ b/charts/bitnami/wordpress/templates/svc.yaml @@ -8,18 +8,10 @@ kind: Service metadata: name: {{ include "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if or .Values.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -63,4 +55,5 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} diff --git a/charts/bitnami/wordpress/templates/tls-secrets.yaml b/charts/bitnami/wordpress/templates/tls-secrets.yaml index 57e4fc776..728ab5871 100644 --- a/charts/bitnami/wordpress/templates/tls-secrets.yaml +++ b/charts/bitnami/wordpress/templates/tls-secrets.yaml @@ -11,10 +11,7 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ $.Release.Namespace | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -34,10 +31,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/wordpress/values.yaml b/charts/bitnami/wordpress/values.yaml index 8533c82ab..5ac7f6ad9 100644 --- a/charts/bitnami/wordpress/values.yaml +++ b/charts/bitnami/wordpress/values.yaml @@ -76,7 +76,7 @@ diagnosticMode: image: registry: docker.io repository: bitnami/wordpress - tag: 6.3.0-debian-11-r9 + tag: 6.3.0-debian-11-r13 digest: "" ## Specify a imagePullPolicy ## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent' @@ -766,7 +766,7 @@ volumePermissions: image: registry: docker.io repository: bitnami/os-shell - tag: 11-debian-11-r43 + tag: 11-debian-11-r45 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. @@ -860,7 +860,7 @@ metrics: image: registry: docker.io repository: bitnami/apache-exporter - tag: 1.0.1-debian-11-r21 + tag: 1.0.1-debian-11-r23 digest: "" pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/charts/bitnami/zookeeper/Chart.lock b/charts/bitnami/zookeeper/Chart.lock index e5a59ba3e..e9716f484 100644 --- a/charts/bitnami/zookeeper/Chart.lock +++ b/charts/bitnami/zookeeper/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.8.0 -digest: sha256:0119fce6b509ebf3eaf5218f87f6ec0af64ec7da15f272115673b0716c4b6919 -generated: "2023-08-18T00:01:59.31754719Z" + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:36:38.84686+02:00" diff --git a/charts/bitnami/zookeeper/Chart.yaml b/charts/bitnami/zookeeper/Chart.yaml index 1010f28ae..8fe5eddd4 100644 --- a/charts/bitnami/zookeeper/Chart.yaml +++ b/charts/bitnami/zookeeper/Chart.yaml @@ -30,4 +30,4 @@ maintainers: name: zookeeper sources: - https://github.com/bitnami/charts/tree/main/bitnami/zookeeper -version: 12.0.1 +version: 12.1.0 diff --git a/charts/bitnami/zookeeper/charts/common/Chart.yaml b/charts/bitnami/zookeeper/charts/common/Chart.yaml index ae71747b6..644d2a798 100644 --- a/charts/bitnami/zookeeper/charts/common/Chart.yaml +++ b/charts/bitnami/zookeeper/charts/common/Chart.yaml @@ -2,7 +2,7 @@ annotations: category: Infrastructure licenses: Apache-2.0 apiVersion: v2 -appVersion: 2.8.0 +appVersion: 2.9.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 type: library -version: 2.8.0 +version: 2.9.0 diff --git a/charts/bitnami/zookeeper/charts/common/README.md b/charts/bitnami/zookeeper/charts/common/README.md index b48bb7a25..fe6a01000 100644 --- a/charts/bitnami/zookeeper/charts/common/README.md +++ b/charts/bitnami/zookeeper/charts/common/README.md @@ -7,7 +7,7 @@ A [Helm Library Chart](https://helm.sh/docs/topics/library_charts/#helm) for gro ```yaml dependencies: - name: common - version: 1.x.x + version: 2.x.x repository: oci://registry-1.docker.io/bitnamicharts ``` diff --git a/charts/bitnami/zookeeper/charts/common/templates/_affinities.tpl b/charts/bitnami/zookeeper/charts/common/templates/_affinities.tpl index 0e571028f..b77534bb9 100644 --- a/charts/bitnami/zookeeper/charts/common/templates/_affinities.tpl +++ b/charts/bitnami/zookeeper/charts/common/templates/_affinities.tpl @@ -60,15 +60,16 @@ Return a topologyKey definition {{/* Return a soft podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.soft" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.soft" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.soft" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 10 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 10 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} @@ -81,14 +82,15 @@ preferredDuringSchedulingIgnoredDuringExecution: {{/* Return a hard podAffinity/podAntiAffinity definition -{{ include "common.affinities.pods.hard" (dict "component" "FOO" "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} +{{ include "common.affinities.pods.hard" (dict "component" "FOO" "customLabels" .Values.podLabels "extraMatchLabels" .Values.extraMatchLabels "topologyKey" "BAR" "context" $) -}} */}} {{- define "common.affinities.pods.hard" -}} {{- $component := default "" .component -}} +{{- $customLabels := default (dict) .customLabels -}} {{- $extraMatchLabels := default (dict) .extraMatchLabels -}} requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: - matchLabels: {{- (include "common.labels.matchLabels" .context) | nindent 8 }} + matchLabels: {{- (include "common.labels.matchLabels" ( dict "customLabels" $customLabels "context" .context )) | nindent 8 }} {{- if not (empty $component) }} {{ printf "app.kubernetes.io/component: %s" $component }} {{- end }} diff --git a/charts/bitnami/zookeeper/charts/common/templates/_labels.tpl b/charts/bitnami/zookeeper/charts/common/templates/_labels.tpl index a1d7a95bc..fac46076a 100644 --- a/charts/bitnami/zookeeper/charts/common/templates/_labels.tpl +++ b/charts/bitnami/zookeeper/charts/common/templates/_labels.tpl @@ -4,20 +4,52 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{/* vim: set filetype=mustache: */}} + {{/* Kubernetes standard labels +{{ include "common.labels.standard" (dict "customLabels" .Values.commonLabels "context" $) -}} */}} {{- define "common.labels.standard" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "helm.sh/chart" (include "common.names.chart" .context) + "app.kubernetes.io/instance" .context.Release.Name + "app.kubernetes.io/managed-by" .context.Release.Service + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} helm.sh/chart: {{ include "common.names.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} +{{- end -}} {{/* -Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector +Labels used on immutable fields such as deploy.spec.selector.matchLabels or svc.spec.selector +{{ include "common.labels.matchLabels" (dict "customLabels" .Values.podLabels "context" $) -}} + +We don't want to loop over custom labels appending them to the selector +since it's very likely that it will break deployments, services, etc. +However, it's important to overwrite the standard labels if the user +overwrote them on metadata.labels fields. */}} {{- define "common.labels.matchLabels" -}} +{{- if and (hasKey . "customLabels") (hasKey . "context") -}} +{{ merge + (pick (include "common.tplvalues.render" (dict "value" .customLabels "context" .context) | fromYaml) "app.kubernetes.io/name" "app.kubernetes.io/instance") + (dict + "app.kubernetes.io/name" (include "common.names.name" .context) + "app.kubernetes.io/instance" .context.Release.Name + ) + | toYaml +}} +{{- else -}} app.kubernetes.io/name: {{ include "common.names.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} +{{- end -}} diff --git a/charts/bitnami/zookeeper/templates/configmap.yaml b/charts/bitnami/zookeeper/templates/configmap.yaml index 75f013767..1c5c60b31 100644 --- a/charts/bitnami/zookeeper/templates/configmap.yaml +++ b/charts/bitnami/zookeeper/templates/configmap.yaml @@ -9,10 +9,8 @@ kind: ConfigMap metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + app.kubernetes.io/component: zookeeper {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/metrics-svc.yaml b/charts/bitnami/zookeeper/templates/metrics-svc.yaml index ebb73ec02..adc35c397 100644 --- a/charts/bitnami/zookeeper/templates/metrics-svc.yaml +++ b/charts/bitnami/zookeeper/templates/metrics-svc.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }}-metrics namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.metrics.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.metrics.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.metrics.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.metrics.service.type }} @@ -29,6 +21,7 @@ spec: - name: tcp-metrics port: {{ .Values.metrics.service.port }} targetPort: metrics - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper {{- end }} diff --git a/charts/bitnami/zookeeper/templates/networkpolicy.yaml b/charts/bitnami/zookeeper/templates/networkpolicy.yaml index a96b33396..4165e4a60 100644 --- a/charts/bitnami/zookeeper/templates/networkpolicy.yaml +++ b/charts/bitnami/zookeeper/templates/networkpolicy.yaml @@ -9,16 +9,14 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ include "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} spec: + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} policyTypes: - Ingress ingress: @@ -34,7 +32,7 @@ spec: matchLabels: {{ include "common.names.fullname" . }}-client: "true" - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} # Allow internal communications between nodes - ports: @@ -42,5 +40,5 @@ spec: - port: {{ .Values.containerPorts.election }} from: - podSelector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 14 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 14 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/pdb.yaml b/charts/bitnami/zookeeper/templates/pdb.yaml index 7a9a67a09..d657c9c5e 100644 --- a/charts/bitnami/zookeeper/templates/pdb.yaml +++ b/charts/bitnami/zookeeper/templates/pdb.yaml @@ -10,11 +10,8 @@ kind: PodDisruptionBudget metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -25,7 +22,8 @@ spec: {{- if .Values.pdb.maxUnavailable }} maxUnavailable: {{ .Values.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: zookeeper {{- end }} diff --git a/charts/bitnami/zookeeper/templates/prometheusrule.yaml b/charts/bitnami/zookeeper/templates/prometheusrule.yaml index 70818e6c9..b5a3046a8 100644 --- a/charts/bitnami/zookeeper/templates/prometheusrule.yaml +++ b/charts/bitnami/zookeeper/templates/prometheusrule.yaml @@ -8,16 +8,9 @@ apiVersion: monitoring.coreos.com/v1 kind: PrometheusRule metadata: name: {{ include "common.names.fullname" . }} - {{- if .Values.metrics.prometheusRule.namespace }} - namespace: {{ .Values.metrics.prometheusRule.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.prometheusRule.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.metrics.prometheusRule.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/scripts-configmap.yaml b/charts/bitnami/zookeeper/templates/scripts-configmap.yaml index 794ba4fe6..87950a270 100644 --- a/charts/bitnami/zookeeper/templates/scripts-configmap.yaml +++ b/charts/bitnami/zookeeper/templates/scripts-configmap.yaml @@ -8,11 +8,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-scripts" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/secrets.yaml b/charts/bitnami/zookeeper/templates/secrets.yaml index 7a9b3e2db..40b354413 100644 --- a/charts/bitnami/zookeeper/templates/secrets.yaml +++ b/charts/bitnami/zookeeper/templates/secrets.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ printf "%s-client-auth" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -29,11 +26,8 @@ kind: Secret metadata: name: {{ printf "%s-quorum-auth" (include "common.names.fullname" .) }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -49,10 +43,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }}-client-tls-pass namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -68,10 +59,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }}-quorum-tls-pass namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/serviceaccount.yaml b/charts/bitnami/zookeeper/templates/serviceaccount.yaml index eda2e4a8b..f6113b9af 100644 --- a/charts/bitnami/zookeeper/templates/serviceaccount.yaml +++ b/charts/bitnami/zookeeper/templates/serviceaccount.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ template "zookeeper.serviceAccountName" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper role: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.serviceAccount.annotations }} + {{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/servicemonitor.yaml b/charts/bitnami/zookeeper/templates/servicemonitor.yaml index 936a8c68b..8cc66ec0c 100644 --- a/charts/bitnami/zookeeper/templates/servicemonitor.yaml +++ b/charts/bitnami/zookeeper/templates/servicemonitor.yaml @@ -8,19 +8,12 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: {{ template "common.names.fullname" . }} - {{- if .Values.metrics.serviceMonitor.namespace }} - namespace: {{ .Values.metrics.serviceMonitor.namespace }} - {{- else }} - namespace: {{ .Release.Namespace }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + namespace: {{ default .Release.Namespace .Values.metrics.serviceMonitor.namespace | quote }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: metrics {{- if .Values.metrics.serviceMonitor.additionalLabels }} {{- include "common.tplvalues.render" ( dict "value" .Values.metrics.serviceMonitor.additionalLabels "context" $ ) | nindent 4 }} {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -29,7 +22,7 @@ spec: jobLabel: {{ .Values.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/charts/bitnami/zookeeper/templates/statefulset.yaml b/charts/bitnami/zookeeper/templates/statefulset.yaml index 3ed040f8d..1d91580c2 100644 --- a/charts/bitnami/zookeeper/templates/statefulset.yaml +++ b/charts/bitnami/zookeeper/templates/statefulset.yaml @@ -8,20 +8,18 @@ kind: StatefulSet metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper role: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} spec: replicas: {{ .Values.replicaCount }} podManagementPolicy: {{ .Values.podManagementPolicy }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: zookeeper serviceName: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }} {{- if .Values.updateStrategy }} @@ -42,11 +40,8 @@ spec: {{- if or (include "zookeeper.client.createTlsSecret" .) (include "zookeeper.quorum.createTlsSecret" .) }} checksum/tls-secrets: {{ include (print $.Template.BasePath "/tls-secrets.yaml") . | sha256sum }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: zookeeper - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "zookeeper.serviceAccountName" . }} {{- include "zookeeper.imagePullSecrets" . | nindent 6 }} @@ -57,8 +52,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "zookeeper" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "zookeeper" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "component" "zookeeper" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "component" "zookeeper" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.nodeSelector }} diff --git a/charts/bitnami/zookeeper/templates/svc-headless.yaml b/charts/bitnami/zookeeper/templates/svc-headless.yaml index 0040bca81..611b84ab3 100644 --- a/charts/bitnami/zookeeper/templates/svc-headless.yaml +++ b/charts/bitnami/zookeeper/templates/svc-headless.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.service.headless.annotations }} - annotations: - {{- if .Values.service.headless.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.headless.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.headless.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: ClusterIP @@ -43,5 +35,6 @@ spec: - name: tcp-election port: {{ .Values.service.ports.election }} targetPort: election - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper diff --git a/charts/bitnami/zookeeper/templates/svc.yaml b/charts/bitnami/zookeeper/templates/svc.yaml index 5077eb925..2a894767f 100644 --- a/charts/bitnami/zookeeper/templates/svc.yaml +++ b/charts/bitnami/zookeeper/templates/svc.yaml @@ -8,19 +8,11 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.service.annotations }} - annotations: - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.service.type }} @@ -72,5 +64,6 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: zookeeper diff --git a/charts/bitnami/zookeeper/templates/tls-secrets.yaml b/charts/bitnami/zookeeper/templates/tls-secrets.yaml index df8442190..373bc8626 100644 --- a/charts/bitnami/zookeeper/templates/tls-secrets.yaml +++ b/charts/bitnami/zookeeper/templates/tls-secrets.yaml @@ -18,10 +18,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} @@ -47,10 +44,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "zookeeper.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + 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 }} {{- end }} diff --git a/charts/datadog/datadog/CHANGELOG.md b/charts/datadog/datadog/CHANGELOG.md index a9462a677..b6dba11f5 100644 --- a/charts/datadog/datadog/CHANGELOG.md +++ b/charts/datadog/datadog/CHANGELOG.md @@ -1,5 +1,18 @@ # Datadog changelog +## 3.34.2 + +* Add containerPort 8000/TCP to `cluster-agent` deployment for Admission Controller. + +## 3.34.1 + +* Fix `clusterAgent.admissionController.webhookName` RBAC to avoid restricting `create` by resource name. + +## 3.34.0 + +* Introduced a new parameter `clusterAgent.admissionController.webhookName` for selecting the name of the mutating webhook. +* Narrowed the admission controller's RBAC scope in the cluster agent to only include a single resourceName, specifically `clusterAgent.admissionController.webhookName`. + ## 3.33.10 * Avoid creating the `DD_PROVIDER_KIND` environment variable twice for containers. diff --git a/charts/datadog/datadog/Chart.yaml b/charts/datadog/datadog/Chart.yaml index 486f4176f..d565255c8 100644 --- a/charts/datadog/datadog/Chart.yaml +++ b/charts/datadog/datadog/Chart.yaml @@ -19,4 +19,4 @@ name: datadog sources: - https://app.datadoghq.com/account/settings#agent/kubernetes - https://github.com/DataDog/datadog-agent -version: 3.33.10 +version: 3.34.2 diff --git a/charts/datadog/datadog/README.md b/charts/datadog/datadog/README.md index 647266b73..5920926e4 100644 --- a/charts/datadog/datadog/README.md +++ b/charts/datadog/datadog/README.md @@ -1,6 +1,6 @@ # Datadog -![Version: 3.33.10](https://img.shields.io/badge/Version-3.33.10-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square) +![Version: 3.34.2](https://img.shields.io/badge/Version-3.34.2-informational?style=flat-square) ![AppVersion: 7](https://img.shields.io/badge/AppVersion-7-informational?style=flat-square) [Datadog](https://www.datadoghq.com/) is a hosted infrastructure monitoring platform. This chart adds the Datadog Agent to all nodes in your cluster via a DaemonSet. It also optionally depends on the [kube-state-metrics chart](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-state-metrics). For more information about monitoring Kubernetes with Datadog, please refer to the [Datadog documentation website](https://docs.datadoghq.com/agent/basic_agent_usage/kubernetes/). @@ -489,7 +489,9 @@ helm install \ | clusterAgent.admissionController.enabled | bool | `true` | Enable the admissionController to be able to inject APM/Dogstatsd config and standard tags (env, service, version) automatically into your pods | | clusterAgent.admissionController.failurePolicy | string | `"Ignore"` | Set the failure policy for dynamic admission control.' | | clusterAgent.admissionController.mutateUnlabelled | bool | `false` | Enable injecting config without having the pod label 'admission.datadoghq.com/enabled="true"' | +| clusterAgent.admissionController.port | int | `8000` | Set port of cluster-agent admission controller service | | clusterAgent.admissionController.remoteInstrumentation.enabled | bool | `false` | Enable polling and applying library injection using Remote Config. # This feature is in beta, and enables Remote Config in the Cluster Agent. It also requires Cluster Agent version 7.43+. # Enabling this feature grants the Cluster Agent the permissions to patch Deployment objects in the cluster. | +| clusterAgent.admissionController.webhookName | string | `"datadog-webhook"` | Name of the mutatingwebhookconfigurations created by the cluster-agent | | clusterAgent.advancedConfd | object | `{}` | Provide additional cluster check configurations. Each key is an integration containing several config files. | | clusterAgent.affinity | object | `{}` | Allow the Cluster Agent Deployment to schedule using affinity rules | | clusterAgent.command | list | `[]` | Command to run in the Cluster Agent container as entrypoint | diff --git a/charts/datadog/datadog/templates/agent-services.yaml b/charts/datadog/datadog/templates/agent-services.yaml index ee316592b..5225f565f 100644 --- a/charts/datadog/datadog/templates/agent-services.yaml +++ b/charts/datadog/datadog/templates/agent-services.yaml @@ -57,7 +57,9 @@ spec: app: {{ template "datadog.fullname" . }}-cluster-agent ports: - port: 443 - targetPort: 8000 + targetPort: {{ .Values.clusterAgent.admissionController.port }} + name: datadog-webhook + protocol: TCP {{ end }} {{- if eq (include "enable-service-internal-traffic-policy" .) "true" }} diff --git a/charts/datadog/datadog/templates/cluster-agent-deployment.yaml b/charts/datadog/datadog/templates/cluster-agent-deployment.yaml index 4be729850..0742641e7 100644 --- a/charts/datadog/datadog/templates/cluster-agent-deployment.yaml +++ b/charts/datadog/datadog/templates/cluster-agent-deployment.yaml @@ -141,6 +141,11 @@ spec: name: metricsapi protocol: TCP {{- end }} + {{- if .Values.clusterAgent.admissionController.enabled }} + - containerPort: {{ .Values.clusterAgent.admissionController.port }} + name: datadog-webhook + protocol: TCP + {{- end }} {{- if or .Values.datadog.envFrom .Values.clusterAgent.envFrom }} envFrom: {{- if .Values.datadog.envFrom }} @@ -189,6 +194,8 @@ spec: {{- if .Values.clusterAgent.admissionController.enabled }} - name: DD_ADMISSION_CONTROLLER_ENABLED value: {{ .Values.clusterAgent.admissionController.enabled | quote }} + - name: DD_ADMISSION_CONTROLLER_WEBHOOK_NAME + value: {{ .Values.clusterAgent.admissionController.webhookName | quote }} - name: DD_ADMISSION_CONTROLLER_MUTATE_UNLABELLED value: {{ .Values.clusterAgent.admissionController.mutateUnlabelled | quote }} - name: DD_ADMISSION_CONTROLLER_SERVICE_NAME @@ -213,6 +220,8 @@ spec: {{- end }} - name: DD_ADMISSION_CONTROLLER_FAILURE_POLICY value: {{ .Values.clusterAgent.admissionController.failurePolicy | quote }} + - name: DD_ADMISSION_CONTROLLER_PORT + value: {{ .Values.clusterAgent.admissionController.port | quote }} {{- end }} {{- if eq (include "clusterAgent-remoteConfiguration-enabled" .) "true" }} - name: DD_ADMISSION_CONTROLLER_AUTO_INSTRUMENTATION_PATCHER_ENABLED diff --git a/charts/datadog/datadog/templates/cluster-agent-network-policy.yaml b/charts/datadog/datadog/templates/cluster-agent-network-policy.yaml index 3895fd894..fa91af157 100644 --- a/charts/datadog/datadog/templates/cluster-agent-network-policy.yaml +++ b/charts/datadog/datadog/templates/cluster-agent-network-policy.yaml @@ -38,7 +38,7 @@ spec: {{- end }} {{- if .Values.clusterAgent.admissionController.enabled }} - ports: - - port: 8000 + - port: {{ .Values.clusterAgent.admissionController.port }} {{- end }} {{- if .Values.clusterAgent.metricsProvider.enabled }} - # Ingress from API server for external metrics diff --git a/charts/datadog/datadog/templates/cluster-agent-rbac.yaml b/charts/datadog/datadog/templates/cluster-agent-rbac.yaml index 2311c4e47..976edd450 100644 --- a/charts/datadog/datadog/templates/cluster-agent-rbac.yaml +++ b/charts/datadog/datadog/templates/cluster-agent-rbac.yaml @@ -225,7 +225,14 @@ rules: - admissionregistration.k8s.io resources: - mutatingwebhookconfigurations - verbs: ["get", "list", "watch", "update", "create"] + resourceNames: + - {{ .Values.clusterAgent.admissionController.webhookName | quote }} + verbs: ["get", "list", "watch", "update"] +- apiGroups: + - admissionregistration.k8s.io + resources: + - mutatingwebhookconfigurations + verbs: ["create"] - apiGroups: ["batch"] resources: ["jobs", "cronjobs"] verbs: ["get"] diff --git a/charts/datadog/datadog/values.yaml b/charts/datadog/datadog/values.yaml index bc4c852a4..71aa60ad9 100644 --- a/charts/datadog/datadog/values.yaml +++ b/charts/datadog/datadog/values.yaml @@ -948,6 +948,9 @@ clusterAgent: # clusterAgent.admissionController.enabled -- Enable the admissionController to be able to inject APM/Dogstatsd config and standard tags (env, service, version) automatically into your pods enabled: true + # clusterAgent.admissionController.webhookName -- Name of the mutatingwebhookconfigurations created by the cluster-agent + webhookName: datadog-webhook + # clusterAgent.admissionController.mutateUnlabelled -- Enable injecting config without having the pod label 'admission.datadoghq.com/enabled="true"' mutateUnlabelled: false @@ -973,6 +976,9 @@ clusterAgent: ## Enabling this feature grants the Cluster Agent the permissions to patch Deployment objects in the cluster. enabled: false + # clusterAgent.admissionController.port -- Set port of cluster-agent admission controller service + port: 8000 + # clusterAgent.confd -- Provide additional cluster check configurations. Each key will become a file in /conf.d. ## ref: https://docs.datadoghq.com/agent/autodiscovery/ diff --git a/charts/external-secrets/external-secrets/Chart.yaml b/charts/external-secrets/external-secrets/Chart.yaml index 73b4d6f07..43c1fa3b6 100644 --- a/charts/external-secrets/external-secrets/Chart.yaml +++ b/charts/external-secrets/external-secrets/Chart.yaml @@ -4,7 +4,7 @@ annotations: catalog.cattle.io/kube-version: '>= 1.19.0-0' catalog.cattle.io/release-name: external-secrets apiVersion: v2 -appVersion: v0.9.3 +appVersion: v0.9.4 description: External secret management for Kubernetes home: https://github.com/external-secrets/external-secrets icon: https://raw.githubusercontent.com/external-secrets/external-secrets/main/assets/eso-logo-large.png @@ -17,4 +17,4 @@ maintainers: name: mcavoyk name: external-secrets type: application -version: 0.9.3 +version: 0.9.4 diff --git a/charts/external-secrets/external-secrets/README.md b/charts/external-secrets/external-secrets/README.md index 324f98b79..613fa1532 100644 --- a/charts/external-secrets/external-secrets/README.md +++ b/charts/external-secrets/external-secrets/README.md @@ -4,7 +4,7 @@ [//]: # (README.md generated by gotmpl. DO NOT EDIT.) -![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.9.3](https://img.shields.io/badge/Version-0.9.3-informational?style=flat-square) +![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.9.4](https://img.shields.io/badge/Version-0.9.4-informational?style=flat-square) External secret management for Kubernetes diff --git a/charts/external-secrets/external-secrets/tests/__snapshot__/cert_controller_test.yaml.snap b/charts/external-secrets/external-secrets/tests/__snapshot__/cert_controller_test.yaml.snap index 27b014d29..0f1c652d9 100644 --- a/charts/external-secrets/external-secrets/tests/__snapshot__/cert_controller_test.yaml.snap +++ b/charts/external-secrets/external-secrets/tests/__snapshot__/cert_controller_test.yaml.snap @@ -7,8 +7,8 @@ should match snapshot of default values: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: external-secrets-cert-controller - app.kubernetes.io/version: v0.9.3 - helm.sh/chart: external-secrets-0.9.3 + app.kubernetes.io/version: v0.9.4 + helm.sh/chart: external-secrets-0.9.4 name: RELEASE-NAME-external-secrets-cert-controller namespace: NAMESPACE spec: @@ -35,7 +35,7 @@ should match snapshot of default values: - --secret-namespace=NAMESPACE - --metrics-addr=:8080 - --healthz-addr=:8081 - image: ghcr.io/external-secrets/external-secrets:v0.9.3 + image: ghcr.io/external-secrets/external-secrets:v0.9.4 imagePullPolicy: IfNotPresent name: cert-controller ports: diff --git a/charts/external-secrets/external-secrets/tests/__snapshot__/controller_test.yaml.snap b/charts/external-secrets/external-secrets/tests/__snapshot__/controller_test.yaml.snap index e4237565f..d19257548 100644 --- a/charts/external-secrets/external-secrets/tests/__snapshot__/controller_test.yaml.snap +++ b/charts/external-secrets/external-secrets/tests/__snapshot__/controller_test.yaml.snap @@ -7,8 +7,8 @@ should match snapshot of default values: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: external-secrets - app.kubernetes.io/version: v0.9.3 - helm.sh/chart: external-secrets-0.9.3 + app.kubernetes.io/version: v0.9.4 + helm.sh/chart: external-secrets-0.9.4 name: RELEASE-NAME-external-secrets namespace: NAMESPACE spec: @@ -28,7 +28,7 @@ should match snapshot of default values: containers: - args: - --concurrent=1 - image: ghcr.io/external-secrets/external-secrets:v0.9.3 + image: ghcr.io/external-secrets/external-secrets:v0.9.4 imagePullPolicy: IfNotPresent name: external-secrets ports: diff --git a/charts/external-secrets/external-secrets/tests/__snapshot__/webhook_test.yaml.snap b/charts/external-secrets/external-secrets/tests/__snapshot__/webhook_test.yaml.snap index f5d69f444..9740bce21 100644 --- a/charts/external-secrets/external-secrets/tests/__snapshot__/webhook_test.yaml.snap +++ b/charts/external-secrets/external-secrets/tests/__snapshot__/webhook_test.yaml.snap @@ -7,8 +7,8 @@ should match snapshot of default values: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: external-secrets-webhook - app.kubernetes.io/version: v0.9.3 - helm.sh/chart: external-secrets-0.9.3 + app.kubernetes.io/version: v0.9.4 + helm.sh/chart: external-secrets-0.9.4 name: RELEASE-NAME-external-secrets-webhook namespace: NAMESPACE spec: @@ -34,7 +34,7 @@ should match snapshot of default values: - --check-interval=5m - --metrics-addr=:8080 - --healthz-addr=:8081 - image: ghcr.io/external-secrets/external-secrets:v0.9.3 + image: ghcr.io/external-secrets/external-secrets:v0.9.4 imagePullPolicy: IfNotPresent name: webhook ports: @@ -78,8 +78,8 @@ should match snapshot of default values: app.kubernetes.io/instance: RELEASE-NAME app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: external-secrets-webhook - app.kubernetes.io/version: v0.9.3 + app.kubernetes.io/version: v0.9.4 external-secrets.io/component: webhook - helm.sh/chart: external-secrets-0.9.3 + helm.sh/chart: external-secrets-0.9.4 name: RELEASE-NAME-external-secrets-webhook namespace: NAMESPACE diff --git a/charts/jenkins/jenkins/CHANGELOG.md b/charts/jenkins/jenkins/CHANGELOG.md index 1faae3698..6d94f8189 100644 --- a/charts/jenkins/jenkins/CHANGELOG.md +++ b/charts/jenkins/jenkins/CHANGELOG.md @@ -12,6 +12,21 @@ Use the following links to reference issues, PRs, and commits prior to v2.6.0. The changelog until v1.5.7 was auto-generated based on git commits. Those entries include a reference to the git commit to be able to get more details. +## 4.6.1 + +Update `configuration-as-code` plugin to fix dependency issues with `azure-ad` plugin + +## 4.6.0 + +Added `.Values.controller.httpsKeyStore.jenkinsHttpsJksSecretKey` to allow overriding the default secret key containing the JKS file. +Added `.Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName` to allow getting the JKS password from a different secret. +Added `.Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretKey` to allow overriding the default secret key containing the JKS password. + +## 4.5.1 + +Update Jenkins image and appVersion to jenkins lts release version 2.414.1 + + ## 4.5.0 Added `.Values.persistence.dataSource` to allow cloning home PVC from existing dataSource. diff --git a/charts/jenkins/jenkins/Chart.yaml b/charts/jenkins/jenkins/Chart.yaml index 8b52d42e2..1968dfd9b 100644 --- a/charts/jenkins/jenkins/Chart.yaml +++ b/charts/jenkins/jenkins/Chart.yaml @@ -2,7 +2,7 @@ annotations: artifacthub.io/category: integration-delivery artifacthub.io/images: | - name: jenkins - image: jenkins/jenkins:2.401.3-jdk11 + image: jenkins/jenkins:2.414.1-jdk11 - name: k8s-sidecar image: kiwigrid/k8s-sidecar:1.24.4 - name: inbound-agent @@ -22,7 +22,7 @@ annotations: catalog.cattle.io/kube-version: '>=1.14-0' catalog.cattle.io/release-name: jenkins apiVersion: v2 -appVersion: 2.401.3 +appVersion: 2.414.1 description: Jenkins - Build great things at any scale! The leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project. @@ -49,4 +49,4 @@ sources: - https://github.com/jenkinsci/docker-inbound-agent - https://github.com/maorfr/kube-tasks - https://github.com/jenkinsci/configuration-as-code-plugin -version: 4.5.0 +version: 4.6.1 diff --git a/charts/jenkins/jenkins/README.md b/charts/jenkins/jenkins/README.md index ed504e48d..9fb16505f 100644 --- a/charts/jenkins/jenkins/README.md +++ b/charts/jenkins/jenkins/README.md @@ -943,7 +943,8 @@ Here is the [value file section](https://wiki.jenkins.io/pages/viewpage.action?p Keystore itself should be placed in front of `jenkinsKeyStoreBase64Encoded` key and in base64 encoded format. To achieve that after having `keystore.jks` file simply do this: `cat keystore.jks | base64` and paste the output in front of `jenkinsKeyStoreBase64Encoded`. After enabling `httpsKeyStore.enable` make sure that `httpPort` and `targetPort` are not the same, as `targetPort` will serve https. Do not set `controller.httpsKeyStore.httpPort` to `-1` because it will cause readiness and liveliness prob to fail. -If you already have a kubernetes secret that has keystore and its password you can specify its' name in front of `jenkinsHttpsJksSecretName`, You need to remember that your secret should have proper data key names `jenkins-jks-file` and `https-jks-password`. Example: +If you already have a kubernetes secret that has keystore and its password you can specify its' name in front of `jenkinsHttpsJksSecretName`, You need to remember that your secret should have proper data key names `jenkins-jks-file` (or override the key name using `jenkinsHttpsJksSecretKey`) +and `https-jks-password` (or override the key name using `jenkinsHttpsJksPasswordSecretKey`; additionally you can make it get the password from a different secret using `jenkinsHttpsJksPasswordSecretName`). Example: ```yaml controller: diff --git a/charts/jenkins/jenkins/VALUES_SUMMARY.md b/charts/jenkins/jenkins/VALUES_SUMMARY.md index f11b13ae8..7ed0a5714 100644 --- a/charts/jenkins/jenkins/VALUES_SUMMARY.md +++ b/charts/jenkins/jenkins/VALUES_SUMMARY.md @@ -239,6 +239,9 @@ The following tables list the configurable parameters of the Jenkins chart and t | --------------------------------- | ------------------------------------ | ----------------------------------------- | | `controller.httpsKeyStore.enable` | Enables HTTPS keystore on jenkins controller | `false` | | `controller.httpsKeyStore.jenkinsHttpsJksSecretName` | Name of the secret that already has ssl keystore | `` | +| `controller.httpsKeyStore.jenkinsHttpsJksSecretKey` | Name of the key in the secret that already has ssl keystore | `jenkins-jks-file` | +| `controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName` | Name of the secret that contains the JKS password, if it is not in the same secret as the JKS file | `` | +| `controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretKey` | Name of the key in the secret that contains the JKS password | `https-jks-password` | | `controller.httpsKeyStore.httpPort` | HTTP Port that Jenkins should listen on along with HTTPS, it also serves liveness and readiness probs port. When HTTPS keystore is enabled servicePort and targetPort will be used as HTTPS port | `8081` | | `controller.httpsKeyStore.path` | Path of HTTPS keystore file | `/var/jenkins_keystore` | | `controller.httpsKeyStore.fileName` | Jenkins keystore filename which will appear under controller.httpsKeyStore.path | `keystore.jks` | diff --git a/charts/jenkins/jenkins/templates/jenkins-controller-statefulset.yaml b/charts/jenkins/jenkins/templates/jenkins-controller-statefulset.yaml index 477e083f9..7c8bf8d12 100644 --- a/charts/jenkins/jenkins/templates/jenkins-controller-statefulset.yaml +++ b/charts/jenkins/jenkins/templates/jenkins-controller-statefulset.yaml @@ -218,8 +218,8 @@ spec: {{- if not .Values.controller.httpsKeyStore.disableSecretMount }} valueFrom: secretKeyRef: - name: {{ if .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ else }} {{ template "jenkins.fullname" . }}-https-jks {{ end }} - key: {{ "https-jks-password" | quote }} + name: {{ if .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretName }} {{ else if .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ else }} {{ template "jenkins.fullname" . }}-https-jks {{ end }} + key: "{{ .Values.controller.httpsKeyStore.jenkinsHttpsJksPasswordSecretKey }}" {{- else }} value: {{ .Values.controller.httpsKeyStore.password }} {{- end }} @@ -434,7 +434,7 @@ spec: secret: secretName: {{ if .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretName }} {{ else }} {{ template "jenkins.fullname" . }}-https-jks {{ end }} items: - - key: jenkins-jks-file + - key: {{ .Values.controller.httpsKeyStore.jenkinsHttpsJksSecretKey }} path: {{ .Values.controller.httpsKeyStore.fileName }} {{- end }} diff --git a/charts/jenkins/jenkins/values.yaml b/charts/jenkins/jenkins/values.yaml index 01ae146d7..5828710af 100644 --- a/charts/jenkins/jenkins/values.yaml +++ b/charts/jenkins/jenkins/values.yaml @@ -22,7 +22,7 @@ controller: # Used for label app.kubernetes.io/component componentName: "jenkins-controller" image: "jenkins/jenkins" - # tag: "2.401.3-jdk11" + # tag: "2.414.1-jdk11" tagLabel: jdk11 imagePullPolicy: "Always" imagePullSecretName: @@ -247,7 +247,7 @@ controller: - kubernetes:3937.vd7b_82db_e347b_ - workflow-aggregator:596.v8c21c963d92d - git:5.1.0 - - configuration-as-code:1647.ve39ca_b_829b_42 + - configuration-as-code:1670.v564dc8b_982d0 # Set to false to download the minimum required version of all dependencies. installLatestPlugins: true @@ -568,6 +568,9 @@ controller: httpsKeyStore: jenkinsHttpsJksSecretName: '' + jenkinsHttpsJksSecretKey: "jenkins-jks-file" + jenkinsHttpsJksPasswordSecretName: "" + jenkinsHttpsJksPasswordSecretKey: "https-jks-password" enable: false disableSecretMount: false httpPort: 8081 diff --git a/charts/kubecost/cost-analyzer/Chart.yaml b/charts/kubecost/cost-analyzer/Chart.yaml index 80da5c42f..2db26668f 100644 --- a/charts/kubecost/cost-analyzer/Chart.yaml +++ b/charts/kubecost/cost-analyzer/Chart.yaml @@ -7,7 +7,7 @@ annotations: catalog.cattle.io/featured: "1" catalog.cattle.io/release-name: cost-analyzer apiVersion: v2 -appVersion: 1.105.1 +appVersion: 1.105.2 dependencies: - condition: global.grafana.enabled name: grafana @@ -25,4 +25,4 @@ description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to moni cloud costs. icon: https://partner-charts.rancher.io/assets/logos/kubecost.png name: cost-analyzer -version: 1.105.1 +version: 1.105.2 diff --git a/charts/linkerd/linkerd-control-plane/Chart.yaml b/charts/linkerd/linkerd-control-plane/Chart.yaml index 492a01394..cb237178d 100644 --- a/charts/linkerd/linkerd-control-plane/Chart.yaml +++ b/charts/linkerd/linkerd-control-plane/Chart.yaml @@ -5,7 +5,7 @@ annotations: catalog.cattle.io/kube-version: '>=1.21.0-0' catalog.cattle.io/release-name: linkerd-control-plane apiVersion: v2 -appVersion: stable-2.13.6 +appVersion: stable-2.14.0 dependencies: - name: partials repository: file://./charts/partials @@ -25,4 +25,4 @@ name: linkerd-control-plane sources: - https://github.com/linkerd/linkerd2/ type: application -version: 1.12.6 +version: 1.15.0 diff --git a/charts/linkerd/linkerd-control-plane/README.md b/charts/linkerd/linkerd-control-plane/README.md index 9dc5651fc..e5f10bcc0 100644 --- a/charts/linkerd/linkerd-control-plane/README.md +++ b/charts/linkerd/linkerd-control-plane/README.md @@ -3,7 +3,7 @@ Linkerd gives you observability, reliability, and security for your microservices — with no code change required. -![Version: 1.12.6](https://img.shields.io/badge/Version-1.12.6-informational?style=flat-square) +![Version: 1.15.0](https://img.shields.io/badge/Version-1.15.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: edge-XX.X.X](https://img.shields.io/badge/AppVersion-edge--XX.X.X-informational?style=flat-square) @@ -181,6 +181,7 @@ Kubernetes: `>=1.21.0-0` | imagePullSecrets | list | `[]` | For Private docker registries, authentication is needed. Registry secrets are applied to the respective service accounts | | linkerdVersion | string | `"linkerdVersionValue"` | control plane version. See Proxy section for proxy version | | networkValidator.connectAddr | string | `"1.1.1.1:20001"` | Address to which the network-validator will attempt to connect. we expect this to be rewritten | +| networkValidator.enableSecurityContext | bool | `true` | Include a securityContext in the network-validator pod spec | | networkValidator.listenAddr | string | `"0.0.0.0:4140"` | Address to which network-validator listens to requests from itself | | networkValidator.logFormat | string | plain | Log format (`plain` or `json`) for network-validator | | networkValidator.logLevel | string | debug | Log level for the network-validator | diff --git a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_affinity.tpl b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_affinity.tpl index cec0db8ea..5dde1da47 100644 --- a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_affinity.tpl +++ b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_affinity.tpl @@ -8,7 +8,7 @@ podAntiAffinity: operator: In values: - {{ .component }} - topologyKey: failure-domain.beta.kubernetes.io/zone + topologyKey: topology.kubernetes.io/zone weight: 100 requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: diff --git a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_network-validator.tpl b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_network-validator.tpl index c4d0a30f5..58f36e62f 100644 --- a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_network-validator.tpl +++ b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_network-validator.tpl @@ -3,15 +3,18 @@ name: linkerd-network-validator image: {{.Values.proxy.image.name}}:{{.Values.proxy.image.version | default .Values.linkerdVersion }} imagePullPolicy: {{.Values.proxy.image.pullPolicy | default .Values.imagePullPolicy}} {{ include "partials.resources" .Values.proxyInit.resources }} +{{- if or .Values.networkValidator.enableSecurityContext }} securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 65534 seccompProfile: type: RuntimeDefault +{{- end }} command: - /usr/lib/linkerd/linkerd2-network-validator args: diff --git a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_proxy.tpl b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_proxy.tpl index 298b388f7..1f644894b 100644 --- a/charts/linkerd/linkerd-control-plane/charts/partials/templates/_proxy.tpl +++ b/charts/linkerd/linkerd-control-plane/charts/partials/templates/_proxy.tpl @@ -182,6 +182,7 @@ lifecycle: command: - /usr/lib/linkerd/linkerd-await - --timeout=2m + - --port={{.Values.proxy.ports.admin}} {{- end }} {{- if .Values.proxy.waitBeforeExitSeconds }} preStop: diff --git a/charts/linkerd/linkerd-control-plane/templates/destination-rbac.yaml b/charts/linkerd/linkerd-control-plane/templates/destination-rbac.yaml index 9663d9880..6bbc4731b 100644 --- a/charts/linkerd/linkerd-control-plane/templates/destination-rbac.yaml +++ b/charts/linkerd/linkerd-control-plane/templates/destination-rbac.yaml @@ -218,12 +218,26 @@ rules: - get - list - watch + - apiGroups: + - gateway.networking.k8s.io + resources: + - httproutes + verbs: + - get + - list + - watch - apiGroups: - policy.linkerd.io resources: - httproutes/status verbs: - patch + - apiGroups: + - gateway.networking.k8s.io + resources: + - httproutes/status + verbs: + - patch - apiGroups: - coordination.k8s.io resources: @@ -250,3 +264,42 @@ subjects: - kind: ServiceAccount name: linkerd-destination namespace: {{.Release.Namespace}} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: remote-discovery + namespace: {{.Release.Namespace}} + labels: + app.kubernetes.io/part-of: Linkerd + linkerd.io/control-plane-component: destination + linkerd.io/control-plane-ns: {{.Release.Namespace}} + {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }} +rules: + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: linkerd-destination-remote-discovery + namespace: {{.Release.Namespace}} + labels: + app.kubernetes.io/part-of: Linkerd + linkerd.io/control-plane-component: destination + linkerd.io/control-plane-ns: {{.Release.Namespace}} + {{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: remote-discovery +subjects: + - kind: ServiceAccount + name: linkerd-destination + namespace: {{.Release.Namespace}} diff --git a/charts/linkerd/linkerd-control-plane/templates/destination.yaml b/charts/linkerd/linkerd-control-plane/templates/destination.yaml index 0c7ccfe18..bac00ea27 100644 --- a/charts/linkerd/linkerd-control-plane/templates/destination.yaml +++ b/charts/linkerd/linkerd-control-plane/templates/destination.yaml @@ -231,6 +231,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false @@ -266,6 +267,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false @@ -320,6 +322,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false diff --git a/charts/linkerd/linkerd-control-plane/templates/heartbeat.yaml b/charts/linkerd/linkerd-control-plane/templates/heartbeat.yaml index 5797f7f27..c67d03377 100644 --- a/charts/linkerd/linkerd-control-plane/templates/heartbeat.yaml +++ b/charts/linkerd/linkerd-control-plane/templates/heartbeat.yaml @@ -72,6 +72,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false diff --git a/charts/linkerd/linkerd-control-plane/templates/identity.yaml b/charts/linkerd/linkerd-control-plane/templates/identity.yaml index 234e11b30..65a15518e 100644 --- a/charts/linkerd/linkerd-control-plane/templates/identity.yaml +++ b/charts/linkerd/linkerd-control-plane/templates/identity.yaml @@ -188,6 +188,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false diff --git a/charts/linkerd/linkerd-control-plane/templates/proxy-injector.yaml b/charts/linkerd/linkerd-control-plane/templates/proxy-injector.yaml index 1bf096f96..de35d7860 100644 --- a/charts/linkerd/linkerd-control-plane/templates/proxy-injector.yaml +++ b/charts/linkerd/linkerd-control-plane/templates/proxy-injector.yaml @@ -104,6 +104,7 @@ spec: capabilities: drop: - ALL + readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: {{.Values.controllerUID}} allowPrivilegeEscalation: false diff --git a/charts/linkerd/linkerd-control-plane/values-ha.yaml b/charts/linkerd/linkerd-control-plane/values-ha.yaml index 89d97a215..c9e9e71d6 100644 --- a/charts/linkerd/linkerd-control-plane/values-ha.yaml +++ b/charts/linkerd/linkerd-control-plane/values-ha.yaml @@ -52,3 +52,6 @@ webhookFailurePolicy: Fail # service profile validator configuration spValidatorResources: *controller_resources + +# flag for linkerd check +highAvailability: true diff --git a/charts/linkerd/linkerd-control-plane/values.yaml b/charts/linkerd/linkerd-control-plane/values.yaml index be120f992..b8b9559a6 100644 --- a/charts/linkerd/linkerd-control-plane/values.yaml +++ b/charts/linkerd/linkerd-control-plane/values.yaml @@ -22,7 +22,7 @@ controlPlaneTracing: false # -- namespace to send control plane traces to controlPlaneTracingNamespace: linkerd-jaeger # -- control plane version. See Proxy section for proxy version -linkerdVersion: stable-2.13.6 +linkerdVersion: stable-2.14.0 # -- default kubernetes deployment strategy deploymentStrategy: rollingUpdate: @@ -266,6 +266,8 @@ networkValidator: listenAddr: "0.0.0.0:4140" # -- Timeout before network-validator fails to validate the pod's network connectivity timeout: "10s" + # -- Include a securityContext in the network-validator pod spec + enableSecurityContext: true # -- For Private docker registries, authentication is needed. # Registry secrets are applied to the respective service accounts diff --git a/charts/new-relic/nri-bundle/Chart.lock b/charts/new-relic/nri-bundle/Chart.lock index 25cb249bf..ffa84cb8d 100644 --- a/charts/new-relic/nri-bundle/Chart.lock +++ b/charts/new-relic/nri-bundle/Chart.lock @@ -1,16 +1,16 @@ dependencies: - name: newrelic-infrastructure repository: https://newrelic.github.io/nri-kubernetes - version: 3.20.3 + version: 3.21.0 - name: nri-prometheus repository: https://newrelic.github.io/nri-prometheus version: 2.1.17 - name: newrelic-prometheus-agent repository: https://newrelic.github.io/newrelic-prometheus-configurator - version: 1.2.2 + version: 1.2.3 - name: nri-metadata-injection repository: https://newrelic.github.io/k8s-metadata-injection - version: 4.3.2 + version: 4.4.0 - name: newrelic-k8s-metrics-adapter repository: https://newrelic.github.io/newrelic-k8s-metrics-adapter version: 1.2.1 @@ -32,5 +32,5 @@ dependencies: - name: newrelic-infra-operator repository: https://newrelic.github.io/newrelic-infra-operator version: 2.2.2 -digest: sha256:ade19c524ea42c1f7f584e54a58f32ff62b90382f5b2d5191dc664743f74da40 -generated: "2023-08-02T02:07:16.362898985Z" +digest: sha256:aa552413984b337253e87348b6864209d76b6bb1d35d0278b038621c0397b112 +generated: "2023-08-22T16:21:45.549419981Z" diff --git a/charts/new-relic/nri-bundle/Chart.yaml b/charts/new-relic/nri-bundle/Chart.yaml index c5a48a910..631eefb50 100644 --- a/charts/new-relic/nri-bundle/Chart.yaml +++ b/charts/new-relic/nri-bundle/Chart.yaml @@ -7,7 +7,7 @@ dependencies: - condition: infrastructure.enabled,newrelic-infrastructure.enabled name: newrelic-infrastructure repository: file://./charts/newrelic-infrastructure - version: 3.20.3 + version: 3.21.0 - condition: prometheus.enabled,nri-prometheus.enabled name: nri-prometheus repository: file://./charts/nri-prometheus @@ -15,11 +15,11 @@ dependencies: - condition: newrelic-prometheus-agent.enabled name: newrelic-prometheus-agent repository: file://./charts/newrelic-prometheus-agent - version: 1.2.2 + version: 1.2.3 - condition: webhook.enabled,nri-metadata-injection.enabled name: nri-metadata-injection repository: file://./charts/nri-metadata-injection - version: 4.3.2 + version: 4.4.0 - condition: metrics-adapter.enabled,newrelic-k8s-metrics-adapter.enabled name: newrelic-k8s-metrics-adapter repository: file://./charts/newrelic-k8s-metrics-adapter @@ -89,4 +89,4 @@ sources: - https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging - https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-pixie - https://github.com/newrelic/newrelic-infra-operator/tree/master/charts/newrelic-infra-operator -version: 5.0.25 +version: 5.0.26 diff --git a/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/Chart.yaml b/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/Chart.yaml index 578d257ee..762bede20 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/Chart.yaml +++ b/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 3.15.3 +appVersion: 3.16.0 dependencies: - name: common-library repository: https://helm-charts.newrelic.com @@ -35,4 +35,4 @@ sources: - https://github.com/newrelic/nri-kubernetes/ - https://github.com/newrelic/nri-kubernetes/tree/main/charts/newrelic-infrastructure - https://github.com/newrelic/infrastructure-agent/ -version: 3.20.3 +version: 3.21.0 diff --git a/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/values.yaml b/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/values.yaml index 77a1cefad..e5de2797a 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/values.yaml +++ b/charts/new-relic/nri-bundle/charts/newrelic-infrastructure/values.yaml @@ -30,7 +30,7 @@ images: agent: registry: "" repository: newrelic/infrastructure-bundle - tag: 3.2.12 + tag: 3.2.14 pullPolicy: IfNotPresent # -- Image for the New Relic Kubernetes integration. # @default -- See `values.yaml` diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/CHANGELOG.md b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/CHANGELOG.md index ae2db8860..7d471bd4f 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/CHANGELOG.md +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## v1.2.3 - 2023-08-22 + +### ⛓️ Dependencies +- Updated newrelic/newrelic-prometheus-configurator to v1.5.0 - [Changelog 🔗](https://github.com/newrelic/newrelic-prometheus-configurator/releases/tag/1.5.0) + ## v1.2.2 - 2023-06-15 ### ⛓️ Dependencies diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/Chart.yaml b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/Chart.yaml index bca08f13a..d75909a10 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/Chart.yaml +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/Chart.yaml @@ -1,5 +1,5 @@ annotations: - configuratorVersion: 1.4.2 + configuratorVersion: 1.5.0 apiVersion: v2 appVersion: v2.37.8 dependencies: @@ -31,4 +31,4 @@ maintainers: url: https://github.com/xqi-nr name: newrelic-prometheus-agent type: application -version: 1.2.2 +version: 1.2.3 diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/README.md b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/README.md index a9b1cedd3..f5475a867 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/README.md +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/README.md @@ -247,4 +247,4 @@ The order to set the affinity is to set `affinity` field (at root level), if tha * [nrepai](https://github.com/nrepai) * [csongnr](https://github.com/csongnr) * [vuqtran88](https://github.com/vuqtran88) -* [xqi-nr](https://github.com/xqi-nr) +* [xqi-nr](https://github.com/xqi-nr) \ No newline at end of file diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/release-notes.md b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/release-notes.md index 47012d14d..e6a12fcfd 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/release-notes.md +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/release-notes.md @@ -1,2 +1,2 @@ ### ⛓️ Dependencies -- Updated newrelic/newrelic-prometheus-configurator to v1.4.2 - [Changelog 🔗](https://github.com/newrelic/newrelic-prometheus-configurator/releases/tag/1.4.2) +- Updated newrelic/newrelic-prometheus-configurator to v1.5.0 - [Changelog 🔗](https://github.com/newrelic/newrelic-prometheus-configurator/releases/tag/1.5.0) diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/tests/configmap_test.yaml b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/tests/configmap_test.yaml index 9e99b9755..f2dd0468e 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/tests/configmap_test.yaml +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/tests/configmap_test.yaml @@ -31,7 +31,7 @@ tests: jobs: - extra_metric_relabel_config: - action: keep - regex: prometheus_agent_active_series|prometheus_target_interval_length_seconds|prometheus_target_scrape_pool_targets|prometheus_remote_storage_samples_pending|prometheus_remote_storage_samples_in_total|prometheus_remote_storage_samples_retried_total|prometheus_agent_corruptions_total|prometheus_remote_storage_shards|prometheus_sd_kubernetes_events_total|prometheus_agent_checkpoint_creations_failed_total|prometheus_agent_checkpoint_deletions_failed_total|prometheus_remote_storage_samples_dropped_total|prometheus_remote_storage_samples_failed_total|prometheus_sd_kubernetes_http_request_total|prometheus_agent_truncate_duration_seconds_sum|prometheus_build_info|process_resident_memory_bytes|process_virtual_memory_bytes|process_cpu_seconds_total + regex: prometheus_agent_active_series|prometheus_target_interval_length_seconds|prometheus_target_scrape_pool_targets|prometheus_remote_storage_samples_pending|prometheus_remote_storage_samples_in_total|prometheus_remote_storage_samples_retried_total|prometheus_agent_corruptions_total|prometheus_remote_storage_shards|prometheus_sd_kubernetes_events_total|prometheus_agent_checkpoint_creations_failed_total|prometheus_agent_checkpoint_deletions_failed_total|prometheus_remote_storage_samples_dropped_total|prometheus_remote_storage_samples_failed_total|prometheus_sd_kubernetes_http_request_total|prometheus_agent_truncate_duration_seconds_sum|prometheus_build_info|process_resident_memory_bytes|process_virtual_memory_bytes|process_cpu_seconds_total|prometheus_remote_storage_bytes_total source_labels: - __name__ job_name: self-metrics diff --git a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/values.yaml b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/values.yaml index 571a5b133..2fb3ed7bc 100644 --- a/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/values.yaml +++ b/charts/new-relic/nri-bundle/charts/newrelic-prometheus-agent/values.yaml @@ -392,7 +392,8 @@ config: prometheus_build_info|\ process_resident_memory_bytes|\ process_virtual_memory_bytes|\ - process_cpu_seconds_total" + process_cpu_seconds_total|\ + prometheus_remote_storage_bytes_total" action: keep # -- The job name assigned to scraped metrics by default. diff --git a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/Chart.yaml b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/Chart.yaml index ba9fca4be..dc03d8533 100644 --- a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/Chart.yaml +++ b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -appVersion: 1.10.2 +appVersion: 1.11.0 dependencies: - name: common-library repository: https://helm-charts.newrelic.com @@ -34,4 +34,4 @@ name: nri-metadata-injection sources: - https://github.com/newrelic/k8s-metadata-injection - https://github.com/newrelic/k8s-metadata-injection/tree/master/charts/nri-metadata-injection -version: 4.3.2 +version: 4.4.0 diff --git a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/README.md b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/README.md index 93d370ab5..7e080dc21 100644 --- a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/README.md +++ b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/README.md @@ -33,6 +33,8 @@ Options that can be defined globally include `affinity`, `nodeSelector`, `tolera |-----|------|---------|-------------| | affinity | object | `{}` | Sets pod/node affinities. Can be configured also with `global.affinity` | | certManager.enabled | bool | `false` | Use cert manager for webhook certs | +| certManager.rootCertificateDuration | string | `"43800h"` | Sets the root certificate duration. Defaults to 43800h (5 years). | +| certManager.webhookCertificateDuration | string | `"8760h"` | Sets certificate duration. Defaults to 8760h (1 year). | | cluster | string | `""` | Name of the Kubernetes cluster monitored. Can be configured also with `global.cluster` | | containerSecurityContext | object | `{}` | Sets security context (at container level). Can be configured also with `global.containerSecurityContext` | | customTLSCertificate | bool | `false` | Use custom tls certificates for the webhook, or let the chart handle it automatically. Ref: https://docs.newrelic.com/docs/integrations/kubernetes-integration/link-your-applications/link-your-applications-kubernetes#configure-injection | diff --git a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/templates/cert-manager.yaml b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/templates/cert-manager.yaml index c3327e1ef..502fa44bb 100644 --- a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/templates/cert-manager.yaml +++ b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/templates/cert-manager.yaml @@ -18,7 +18,7 @@ metadata: namespace: {{ .Release.Namespace }} spec: secretName: {{ include "newrelic.common.naming.fullname" . }}-root-cert - duration: 43800h # 5y + duration: {{ .Values.certManager.rootCertificateDuration}} issuerRef: name: {{ include "nri-metadata-injection.fullname.self-signed-issuer" . }} commonName: "ca.webhook.nri" @@ -43,7 +43,7 @@ metadata: namespace: {{ .Release.Namespace }} spec: secretName: {{ include "nri-metadata-injection.fullname.admission" . }} - duration: 8760h # 1y + duration: {{ .Values.certManager.webhookCertificateDuration }} issuerRef: name: {{ include "nri-metadata-injection.fullname.root-issuer" . }} dnsNames: diff --git a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/values.yaml b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/values.yaml index 4a124247e..849135c35 100644 --- a/charts/new-relic/nri-bundle/charts/nri-metadata-injection/values.yaml +++ b/charts/new-relic/nri-bundle/charts/nri-metadata-injection/values.yaml @@ -76,6 +76,10 @@ containerSecurityContext: {} certManager: # certManager.enabled -- Use cert manager for webhook certs enabled: false + # -- Sets the root certificate duration. Defaults to 43800h (5 years). + rootCertificateDuration: 43800h + # -- Sets certificate duration. Defaults to 8760h (1 year). + webhookCertificateDuration: 8760h # -- Sets pod/node affinities. Can be configured also with `global.affinity` affinity: {} diff --git a/charts/redpanda/redpanda/Chart.lock b/charts/redpanda/redpanda/Chart.lock index 0d91db22a..e42e16c58 100644 --- a/charts/redpanda/redpanda/Chart.lock +++ b/charts/redpanda/redpanda/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: console repository: https://charts.redpanda.com - version: 0.6.9 + version: 0.7.0 - name: connectors repository: https://charts.redpanda.com version: 0.1.5 -digest: sha256:a6551592297729ade6278eb5df5ffe545bcc0aadb94606886cc15555eec0204f -generated: "2023-08-21T17:46:28.527568897Z" +digest: sha256:dd7afd55f6eb7e9b3a91b0e5eeda47138e23c255b32d277ad4cb3a7ad3ec1b1f +generated: "2023-08-22T23:48:13.775690752Z" diff --git a/charts/redpanda/redpanda/Chart.yaml b/charts/redpanda/redpanda/Chart.yaml index e99886cab..5b3dd425a 100644 --- a/charts/redpanda/redpanda/Chart.yaml +++ b/charts/redpanda/redpanda/Chart.yaml @@ -1,7 +1,7 @@ annotations: artifacthub.io/images: | - name: redpanda - image: docker.redpanda.com/redpandadata/redpanda:v23.2.5 + image: docker.redpanda.com/redpandadata/redpanda:v23.2.6 - name: busybox image: busybox:latest - name: mintel/docker-alpine-bash-curl-jq @@ -17,7 +17,7 @@ annotations: catalog.cattle.io/kube-version: '>=1.21-0' catalog.cattle.io/release-name: redpanda apiVersion: v2 -appVersion: v23.2.5 +appVersion: v23.2.6 dependencies: - condition: console.enabled name: console @@ -37,4 +37,4 @@ name: redpanda sources: - https://github.com/redpanda-data/helm-charts type: application -version: 5.1.4 +version: 5.1.5 diff --git a/charts/redpanda/redpanda/charts/console/Chart.yaml b/charts/redpanda/redpanda/charts/console/Chart.yaml index 64265bdf6..b04b49c35 100644 --- a/charts/redpanda/redpanda/charts/console/Chart.yaml +++ b/charts/redpanda/redpanda/charts/console/Chart.yaml @@ -19,4 +19,4 @@ name: console sources: - https://github.com/redpanda-data/helm-charts type: application -version: 0.6.9 +version: 0.7.0 diff --git a/charts/redpanda/redpanda/charts/console/templates/deployment.yaml b/charts/redpanda/redpanda/charts/console/templates/deployment.yaml index 3ab031571..8c77178da 100644 --- a/charts/redpanda/redpanda/charts/console/templates/deployment.yaml +++ b/charts/redpanda/redpanda/charts/console/templates/deployment.yaml @@ -70,6 +70,10 @@ spec: {{- with .Values.extraVolumes }} {{- toYaml . | nindent 8 }} {{- end }} +{{- if dig "extraInitContainers" false .Values.initContainers }} + initContainers: +{{- tpl .Values.initContainers.extraInitContainers . | nindent 8 }} +{{- end }} containers: - name: {{ .Chart.Name }} {{- with .Values.deployment.command }} diff --git a/charts/redpanda/redpanda/charts/console/values.schema.json b/charts/redpanda/redpanda/charts/console/values.schema.json index 1d5b84524..6ac95f2ac 100644 --- a/charts/redpanda/redpanda/charts/console/values.schema.json +++ b/charts/redpanda/redpanda/charts/console/values.schema.json @@ -5,291 +5,299 @@ "image" ], "properties": { - "affinity": { - "type": "object" - }, - "autoscaling": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean" - }, - "maxReplicas": { - "type": "integer" - }, - "minReplicas": { - "type": "integer" - }, - "targetCPUUtilizationPercentage": { - "type": "integer" - } - } - }, - "configmap": { - "type": "object", - "properties": { - "create": { - "type": "boolean" - } - } - }, - "console": { - "type": "object" - }, - "deployment": { - "type": "object", - "properties": { - "create": { - "type": "boolean" - } - } - }, - "extraContainers": { - "type": "array" - }, - "extraEnv": { - "type": "array" - }, - "extraEnvFrom": { - "type": "array" - }, - "extraVolumeMounts": { - "type": "array" - }, - "extraVolumes": { - "type": "array" - }, - "fullnameOverride": { - "type": "string" - }, - "image": { - "type": "object", - "required": [ - "repository" - ], - "properties": { - "pullPolicy": { - "type": "string" - }, - "registry": { - "type": "string" - }, - "repository": { - "type": "string", - "minLength": 1 - }, - "tag": { - "type": "string" - } - } - }, - "imagePullSecrets": { - "type": "array" - }, - "ingress": { - "type": "object", - "properties": { - "annotations": { - "type": "object" - }, - "className": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "hosts": { - "type": "array", - "items": { - "type": "object", - "properties": { - "host": { - "type": "string" - }, - "paths": { - "type": "array", - "items": { - "type": "object", - "properties": { - "path": { - "type": "string" - }, - "pathType": { - "type": "string" - } - } - } - } - } - } - }, - "tls": { - "type": "array" - } - } - }, - "livenessProbe": { - "type": "object", - "properties": { - "failureThreshold": { - "type": "integer" - }, - "initialDelaySeconds": { - "type": "integer" - }, - "periodSeconds": { - "type": "integer" - }, - "successThreshold": { - "type": "integer" - }, - "timeoutSeconds": { - "type": "integer" - } - } - }, - "nameOverride": { - "type": "string" - }, - "nodeSelector": { - "type": "object" - }, - "annotations": { - "type": "object" - }, - "podAnnotations": { - "type": "object" - }, - "podSecurityContext": { - "type": "object", - "properties": { - "fsGroup": { - "type": "integer" - }, - "runAsUser": { - "type": "integer" - } - } - }, - "readinessProbe": { - "type": "object", - "properties": { - "failureThreshold": { - "type": "integer" - }, - "initialDelaySeconds": { - "type": "integer" - }, - "periodSeconds": { - "type": "integer" - }, - "successThreshold": { - "type": "integer" - }, - "timeoutSeconds": { - "type": "integer" - } - } - }, - "replicaCount": { + "affinity": { + "type": "object" + }, + "autoscaling": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + }, + "maxReplicas": { "type": "integer" - }, - "resources": { - "type": "object" - }, - "secret": { - "type": "object", - "properties": { - "create": { - "type": "boolean" - }, - "enterprise": { - "type": "object" - }, - "kafka": { - "type": "object" - }, - "login": { - "type": "object", - "properties": { - "jwtSecret": { - "type": "string" - }, - "github": { - "type": "object" - }, - "google": { - "type": "object" - }, - "oidc": { - "type": "object" - }, - "okta": { - "type": "object" - } - } - }, - "redpanda": { - "type": "object", - "properties": { - "adminApi": { - "type": "object" - } - } - } - } - }, - "secretMounts": { - "type": "array" - }, - "securityContext": { - "type": "object", - "properties": { - "runAsNonRoot": { - "type": "boolean" - } - } - }, - "service": { - "type": "object", - "properties": { - "annotations": { - "type": "object" - }, - "port": { - "type": "integer" - }, - "targetPort": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ] - }, - "type": { - "type": "string" - } - } - }, - "serviceAccount": { - "type": "object", - "properties": { - "annotations": { - "type": "object" - }, - "create": { - "type": "boolean" - }, - "name": { - "type": "string" - } - } - }, - "tolerations": { - "type": "array" + }, + "minReplicas": { + "type": "integer" + }, + "targetCPUUtilizationPercentage": { + "type": "integer" + } } + }, + "configmap": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + } + } + }, + "console": { + "type": "object" + }, + "deployment": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + } + } + }, + "extraContainers": { + "type": "array" + }, + "extraEnv": { + "type": "array" + }, + "extraEnvFrom": { + "type": "array" + }, + "extraVolumeMounts": { + "type": "array" + }, + "extraVolumes": { + "type": "array" + }, + "fullnameOverride": { + "type": "string" + }, + "image": { + "type": "object", + "required": [ + "repository" + ], + "properties": { + "pullPolicy": { + "type": "string" + }, + "registry": { + "type": "string" + }, + "repository": { + "type": "string", + "minLength": 1 + }, + "tag": { + "type": "string" + } + } + }, + "imagePullSecrets": { + "type": "array" + }, + "ingress": { + "type": "object", + "properties": { + "annotations": { + "type": "object" + }, + "className": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "hosts": { + "type": "array", + "items": { + "type": "object", + "properties": { + "host": { + "type": "string" + }, + "paths": { + "type": "array", + "items": { + "type": "object", + "properties": { + "path": { + "type": "string" + }, + "pathType": { + "type": "string" + } + } + } + } + } + } + }, + "tls": { + "type": "array" + } + } + }, + "livenessProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer" + }, + "initialDelaySeconds": { + "type": "integer" + }, + "periodSeconds": { + "type": "integer" + }, + "successThreshold": { + "type": "integer" + }, + "timeoutSeconds": { + "type": "integer" + } + } + }, + "nameOverride": { + "type": "string" + }, + "nodeSelector": { + "type": "object" + }, + "annotations": { + "type": "object" + }, + "podAnnotations": { + "type": "object" + }, + "podSecurityContext": { + "type": "object", + "properties": { + "fsGroup": { + "type": "integer" + }, + "runAsUser": { + "type": "integer" + } + } + }, + "readinessProbe": { + "type": "object", + "properties": { + "failureThreshold": { + "type": "integer" + }, + "initialDelaySeconds": { + "type": "integer" + }, + "periodSeconds": { + "type": "integer" + }, + "successThreshold": { + "type": "integer" + }, + "timeoutSeconds": { + "type": "integer" + } + } + }, + "replicaCount": { + "type": "integer" + }, + "resources": { + "type": "object" + }, + "secret": { + "type": "object", + "properties": { + "create": { + "type": "boolean" + }, + "enterprise": { + "type": "object" + }, + "kafka": { + "type": "object" + }, + "login": { + "type": "object", + "properties": { + "jwtSecret": { + "type": "string" + }, + "github": { + "type": "object" + }, + "google": { + "type": "object" + }, + "oidc": { + "type": "object" + }, + "okta": { + "type": "object" + } + } + }, + "redpanda": { + "type": "object", + "properties": { + "adminApi": { + "type": "object" + } + } + } + } + }, + "secretMounts": { + "type": "array" + }, + "securityContext": { + "type": "object", + "properties": { + "runAsNonRoot": { + "type": "boolean" + } + } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "type": "object" + }, + "port": { + "type": "integer" + }, + "targetPort": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ] + }, + "type": { + "type": "string" + } + } + }, + "serviceAccount": { + "type": "object", + "properties": { + "annotations": { + "type": "object" + }, + "create": { + "type": "boolean" + }, + "name": { + "type": "string" + } + } + }, + "tolerations": { + "type": "array" + }, + "initContainers": { + "type": "object", + "properties": { + "extraInitContainers": { + "type": "string" + } + } + } } } diff --git a/charts/redpanda/redpanda/charts/console/values.yaml b/charts/redpanda/redpanda/charts/console/values.yaml index 6986a066b..890ff7391 100644 --- a/charts/redpanda/redpanda/charts/console/values.yaml +++ b/charts/redpanda/redpanda/charts/console/values.yaml @@ -240,6 +240,16 @@ readinessProbe: successThreshold: 1 failureThreshold: 3 +initContainers: + extraInitContainers: |- +# - name: "test-init-container" +# image: "mintel/docker-alpine-bash-curl-jq:latest" +# command: [ "/bin/bash", "-c" ] +# args: +# - | +# set -xe +# echo "Hello World!" + configmap: create: true deployment: diff --git a/charts/speedscale/speedscale-operator/Chart.yaml b/charts/speedscale/speedscale-operator/Chart.yaml index 44c1417e5..e08b4831c 100644 --- a/charts/speedscale/speedscale-operator/Chart.yaml +++ b/charts/speedscale/speedscale-operator/Chart.yaml @@ -4,7 +4,7 @@ annotations: catalog.cattle.io/kube-version: '>= 1.17.0-0' catalog.cattle.io/release-name: speedscale-operator apiVersion: v1 -appVersion: 1.3.293 +appVersion: 1.3.320 description: Stress test your APIs with real world scenarios. Collect and replay traffic without scripting. home: https://speedscale.com @@ -24,4 +24,4 @@ maintainers: - email: support@speedscale.com name: Speedscale Support name: speedscale-operator -version: 1.3.27 +version: 1.3.28 diff --git a/charts/speedscale/speedscale-operator/README.md b/charts/speedscale/speedscale-operator/README.md index 54a3141bf..2904df1b5 100644 --- a/charts/speedscale/speedscale-operator/README.md +++ b/charts/speedscale/speedscale-operator/README.md @@ -101,10 +101,10 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. -### Upgrade to 1.3.27 +### Upgrade to 1.3.28 ```bash -kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.3.27/templates/crds/trafficreplays.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.3.28/templates/crds/trafficreplays.yaml ``` ### Upgrade to 1.1.0 diff --git a/charts/speedscale/speedscale-operator/app-readme.md b/charts/speedscale/speedscale-operator/app-readme.md index 54a3141bf..2904df1b5 100644 --- a/charts/speedscale/speedscale-operator/app-readme.md +++ b/charts/speedscale/speedscale-operator/app-readme.md @@ -101,10 +101,10 @@ _See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documen A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions. -### Upgrade to 1.3.27 +### Upgrade to 1.3.28 ```bash -kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.3.27/templates/crds/trafficreplays.yaml +kubectl apply --server-side -f https://raw.githubusercontent.com/speedscale/operator-helm/main/1.3.28/templates/crds/trafficreplays.yaml ``` ### Upgrade to 1.1.0 diff --git a/charts/speedscale/speedscale-operator/values.yaml b/charts/speedscale/speedscale-operator/values.yaml index c9db95880..b20164ada 100644 --- a/charts/speedscale/speedscale-operator/values.yaml +++ b/charts/speedscale/speedscale-operator/values.yaml @@ -20,7 +20,7 @@ clusterName: "my-cluster" # Speedscale components image settings. image: registry: gcr.io/speedscale - tag: v1.3.293 + tag: v1.3.320 pullPolicy: Always # Log level for Speedscale components. diff --git a/index.yaml b/index.yaml index 10c2ad17d..9ca2c47fb 100644 --- a/index.yaml +++ b/index.yaml @@ -1461,8 +1461,8 @@ entries: argo-cd: - annotations: artifacthub.io/changes: | - - kind: fixed - description: Rename comment of repositoryCredentials to credentialTemplates + - kind: changed + description: Upgrade Argo CD to v2.8.1 artifacthub.io/signKey: | fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 url: https://argoproj.github.io/argo-helm/pgp_keys.asc @@ -1472,8 +1472,8 @@ entries: catalog.cattle.io/kube-version: '>=1.23.0-0' catalog.cattle.io/release-name: argo-cd apiVersion: v2 - appVersion: v2.8.0 - created: "2023-08-16T17:40:49.482937882Z" + appVersion: v2.8.1 + created: "2023-08-24T14:38:35.955647794Z" dependencies: - condition: redis-ha.enabled name: redis-ha @@ -1481,7 +1481,46 @@ entries: version: 4.23.0 description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes. - digest: 6f34a818b4d28ee94575d7ee4a36d453d7567d2774d2eef338b9530caa93750d + digest: 0b8beb2ed42bc0dc5689d5be9727ec6d6cb0bce597ec7c2cc5ef0be314c10d94 + home: https://github.com/argoproj/argo-helm + icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png + keywords: + - argoproj + - argocd + - gitops + kubeVersion: '>=1.23.0-0' + maintainers: + - name: argoproj + url: https://argoproj.github.io/ + name: argo-cd + sources: + - https://github.com/argoproj/argo-helm/tree/main/charts/argo-cd + - https://github.com/argoproj/argo-cd + urls: + - assets/argo/argo-cd-5.43.5.tgz + version: 5.43.5 + - annotations: + artifacthub.io/changes: | + - kind: fixed + description: Rename comment of repositoryCredentials to credentialTemplates + artifacthub.io/signKey: | + fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252 + url: https://argoproj.github.io/argo-helm/pgp_keys.asc + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Argo CD + catalog.cattle.io/kube-version: '>=1.23.0-0' + catalog.cattle.io/release-name: argo-cd + apiVersion: v2 + appVersion: v2.8.0 + created: "2023-08-24T14:38:18.142298855Z" + dependencies: + - condition: redis-ha.enabled + name: redis-ha + repository: file://./charts/redis-ha + version: 4.23.0 + description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery + tool for Kubernetes. + digest: 18a907702129db3e5a012263026d54cb69fa2bde5ae5165eef032f65490dae70 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -8957,6 +8996,48 @@ entries: - assets/aws-event-sources/aws-event-sources-0.1.901.tgz version: 0.1.901 cassandra: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Apache Cassandra + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: cassandra + category: Database + images: | + - name: cassandra-exporter + image: docker.io/bitnami/cassandra-exporter:2.3.8-debian-11-r383 + - name: cassandra + image: docker.io/bitnami/cassandra:4.1.3-debian-11-r24 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r40 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 4.1.3 + created: "2023-08-24T14:38:37.280762291Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Apache Cassandra is an open source distributed database management + system designed to handle large amounts of data across many servers, providing + high availability with no single point of failure. + digest: b75431d18e6b2037418548b185bd371cc06a9e713efe34d7d7a80a2dd81039a2 + home: https://bitnami.com + icon: https://svn.apache.org/repos/asf/comdev/project-logos/originals/cassandra-4.svg + keywords: + - cassandra + - database + - nosql + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: cassandra + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/cassandra + urls: + - assets/bitnami/cassandra-10.5.0.tgz + version: 10.5.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Apache Cassandra @@ -12614,8 +12695,8 @@ entries: catalog.cattle.io/featured: "1" catalog.cattle.io/release-name: cost-analyzer apiVersion: v2 - appVersion: 1.105.1 - created: "2023-07-31T11:44:12.783233945Z" + appVersion: 1.105.2 + created: "2023-08-24T14:38:55.403058463Z" dependencies: - condition: global.grafana.enabled name: grafana @@ -12631,7 +12712,38 @@ entries: version: ~0.29.0 description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to monitor cloud costs. - digest: ffe195fa4470a23099af8a211a5b52f38d6950d01978512caecbc435c03975ea + digest: 854e5b8bd39cbacc30786b61fd8584e5f7101cfbf7d363680a67eb225dcf64a3 + icon: https://partner-charts.rancher.io/assets/logos/kubecost.png + name: cost-analyzer + urls: + - assets/kubecost/cost-analyzer-1.105.2.tgz + version: 1.105.2 + - annotations: + artifacthub.io/links: | + - name: Homepage + url: https://www.kubecost.com + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Kubecost + catalog.cattle.io/release-name: cost-analyzer + apiVersion: v2 + appVersion: 1.105.1 + created: "2023-08-24T14:38:43.093312899Z" + dependencies: + - condition: global.grafana.enabled + name: grafana + repository: file://./charts/grafana + version: ~1.17.2 + - condition: global.prometheus.enabled + name: prometheus + repository: file://./charts/prometheus + version: ~11.0.2 + - condition: global.thanos.enabled + name: thanos + repository: file://./charts/thanos + version: ~0.29.0 + description: A Helm chart that sets up Kubecost, Prometheus, and Grafana to monitor + cloud costs. + digest: a40018b2dd2dd3d8b12b971ba09aa57b63cfeb6afa93947bed25bf60d6e689ae icon: https://partner-charts.rancher.io/assets/logos/kubecost.png name: cost-analyzer urls: @@ -14504,6 +14616,43 @@ entries: - assets/weka/csi-wekafsplugin-0.6.400.tgz version: 0.6.400 datadog: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Datadog + catalog.cattle.io/kube-version: '>=1.10-0' + catalog.cattle.io/release-name: datadog + apiVersion: v1 + appVersion: "7" + created: "2023-08-24T14:38:40.305039783Z" + dependencies: + - condition: clusterAgent.metricsProvider.useDatadogMetrics + name: datadog-crds + repository: https://helm.datadoghq.com + tags: + - install-crds + version: 1.0.1 + - condition: datadog.kubeStateMetricsEnabled + name: kube-state-metrics + repository: https://prometheus-community.github.io/helm-charts + version: 2.13.2 + description: Datadog Agent + digest: fdb22586fda7a34c9f9e2e99e774c30040c26a8d3dfa58af549e8d9dabd03e8d + home: https://www.datadoghq.com + icon: https://datadog-live.imgix.net/img/dd_logo_70x75.png + keywords: + - monitoring + - alerting + - metric + maintainers: + - email: support@datadoghq.com + name: Datadog + name: datadog + sources: + - https://app.datadoghq.com/account/settings#agent/kubernetes + - https://github.com/DataDog/datadog-agent + urls: + - assets/datadog/datadog-3.34.2.tgz + version: 3.34.2 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Datadog @@ -17775,6 +17924,30 @@ entries: - assets/elastic/elasticsearch-7.17.3.tgz version: 7.17.3 external-secrets: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: External Secrets Operator + catalog.cattle.io/kube-version: '>= 1.19.0-0' + catalog.cattle.io/release-name: external-secrets + apiVersion: v2 + appVersion: v0.9.4 + created: "2023-08-24T14:38:40.593379531Z" + description: External secret management for Kubernetes + digest: cb70f0947703fedc5d2b905aa4ab5e75471a7a87fe133bf17fd0da6574de9c85 + home: https://github.com/external-secrets/external-secrets + icon: https://raw.githubusercontent.com/external-secrets/external-secrets/main/assets/eso-logo-large.png + keywords: + - kubernetes-external-secrets + - secrets + kubeVersion: '>= 1.19.0-0' + maintainers: + - email: kellinmcavoy@gmail.com + name: mcavoyk + name: external-secrets + type: application + urls: + - assets/external-secrets/external-secrets-0.9.4.tgz + version: 0.9.4 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: External Secrets Operator @@ -22890,6 +23063,62 @@ entries: - assets/jaeger/jaeger-operator-2.36.0.tgz version: 2.36.0 jenkins: + - annotations: + artifacthub.io/category: integration-delivery + artifacthub.io/images: | + - name: jenkins + image: jenkins/jenkins:2.414.1-jdk11 + - name: k8s-sidecar + image: kiwigrid/k8s-sidecar:1.24.4 + - name: inbound-agent + image: jenkins/inbound-agent:3107.v665000b_51092-15 + - name: backup + image: maorfr/kube-tasks:0.2.0 + artifacthub.io/license: Apache-2.0 + artifacthub.io/links: | + - name: Chart Source + url: https://github.com/jenkinsci/helm-charts/tree/main/charts/jenkins + - name: Jenkins + url: https://www.jenkins.io/ + - name: support + url: https://github.com/jenkinsci/helm-charts/issues + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Jenkins + catalog.cattle.io/kube-version: '>=1.14-0' + catalog.cattle.io/release-name: jenkins + apiVersion: v2 + appVersion: 2.414.1 + created: "2023-08-24T14:38:41.308812534Z" + description: Jenkins - Build great things at any scale! The leading open source + automation server, Jenkins provides hundreds of plugins to support building, + deploying and automating any project. + digest: 2e77ad92fe821f0730dd086793b4647e5b5bd5d93674dca2b0fa8b5486912fa0 + home: https://jenkins.io/ + icon: https://get.jenkins.io/art/jenkins-logo/logo.svg + keywords: + - jenkins + - ci + - devops + maintainers: + - email: maor.friedman@redhat.com + name: maorfr + - email: mail@torstenwalter.de + name: torstenwalter + - email: garridomota@gmail.com + name: mogaal + - email: wmcdona89@gmail.com + name: wmcdona89 + - email: timjacomb1@gmail.com + name: timja + name: jenkins + sources: + - https://github.com/jenkinsci/jenkins + - https://github.com/jenkinsci/docker-inbound-agent + - https://github.com/maorfr/kube-tasks + - https://github.com/jenkinsci/configuration-as-code-plugin + urls: + - assets/jenkins/jenkins-4.6.1.tgz + version: 4.6.1 - annotations: artifacthub.io/category: integration-delivery artifacthub.io/images: | @@ -25982,6 +26211,58 @@ entries: - assets/kasten/k10-4.5.900.tgz version: 4.5.900 kafka: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Apache Kafka + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: kafka + category: Infrastructure + images: | + - name: jmx-exporter + image: docker.io/bitnami/jmx-exporter:0.19.0-debian-11-r49 + - name: kafka-exporter + image: docker.io/bitnami/kafka-exporter:1.7.0-debian-11-r85 + - name: kafka + image: docker.io/bitnami/kafka:3.5.1-debian-11-r25 + - name: kubectl + image: docker.io/bitnami/kubectl:1.25.12-debian-11-r29 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 3.5.1 + created: "2023-08-24T14:38:37.711251956Z" + dependencies: + - condition: zookeeper.enabled + name: zookeeper + repository: file://./charts/zookeeper + version: 12.x.x + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Apache Kafka is a distributed streaming platform designed to build + real-time pipelines and can be used as a message broker or as a replacement + for a log aggregation solution for big data applications. + digest: fa7d92f4bff389eddc95524aa6ef7baa958d2442273d139de69a88708fd6c606 + home: https://bitnami.com + icon: https://svn.apache.org/repos/asf/comdev/project-logos/originals/kafka.svg + keywords: + - kafka + - zookeeper + - streaming + - producer + - consumer + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: kafka + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/kafka + urls: + - assets/bitnami/kafka-25.0.1.tgz + version: 25.0.1 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Apache Kafka @@ -30092,15 +30373,46 @@ entries: catalog.cattle.io/kube-version: '>=1.21.0-0' catalog.cattle.io/release-name: linkerd-control-plane apiVersion: v2 - appVersion: stable-2.13.6 - created: "2023-08-11T18:30:33.356842302Z" + appVersion: stable-2.14.0 + created: "2023-08-24T14:39:08.450895263Z" dependencies: - name: partials repository: file://./charts/partials version: 0.1.0 description: 'Linkerd gives you observability, reliability, and security for your microservices — with no code change required. ' - digest: 670aafa16b43070e80658ce0e99cb21966bdce34e4a1e5b5210dc1c7c95840ba + digest: df8d76cbcfe315f0a151ed1eafb9997679c655443083f36026e224e9cb082a70 + home: https://linkerd.io + icon: https://linkerd.io/images/logo-only-200h.png + keywords: + - service-mesh + kubeVersion: '>=1.21.0-0' + maintainers: + - email: cncf-linkerd-dev@lists.cncf.io + name: Linkerd authors + url: https://linkerd.io/ + name: linkerd-control-plane + sources: + - https://github.com/linkerd/linkerd2/ + type: application + urls: + - assets/linkerd/linkerd-control-plane-1.15.0.tgz + version: 1.15.0 + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Linkerd Control Plane + catalog.cattle.io/kube-version: '>=1.21.0-0' + catalog.cattle.io/release-name: linkerd-control-plane + apiVersion: v2 + appVersion: stable-2.13.6 + created: "2023-08-24T14:38:55.530474646Z" + dependencies: + - name: partials + repository: file://./charts/partials + version: 0.1.0 + description: 'Linkerd gives you observability, reliability, and security for your + microservices — with no code change required. ' + digest: e02cbbcb350fb792c405757b0bbe6c13438569b4b035d056a6fbe0a7846eb7a7 home: https://linkerd.io icon: https://linkerd.io/images/logo-only-200h.png keywords: @@ -30543,6 +30855,50 @@ entries: - assets/elastic/logstash-7.17.3.tgz version: 7.17.3 mariadb: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: MariaDB + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: mariadb + category: Database + images: | + - name: mariadb + image: docker.io/bitnami/mariadb:11.0.3-debian-11-r5 + - name: mysqld-exporter + image: docker.io/bitnami/mysqld-exporter:0.15.0-debian-11-r24 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 11.0.3 + created: "2023-08-24T14:38:37.847730658Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: MariaDB is an open source, community-developed SQL database server + that is widely in use around the world due to its enterprise features, flexibility, + and collaboration with leading tech firms. + digest: f2147e185c7df2d7d9c8b49167abc0af2cab2dd23132ad5396fbcaca976f6c10 + home: https://bitnami.com + icon: https://mariadb.com/wp-content/uploads/2019/11/mariadb-logo-vert_black-transparent.png + keywords: + - mariadb + - mysql + - database + - sql + - prometheus + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: mariadb + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/mariadb + urls: + - assets/bitnami/mariadb-13.1.1.tgz + version: 13.1.1 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: MariaDB @@ -32204,6 +32560,50 @@ entries: - assets/minio/minio-operator-4.4.1700.tgz version: 4.4.1700 mysql: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: MySQL + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: mysql + category: Database + images: | + - name: mysql + image: docker.io/bitnami/mysql:8.0.34-debian-11-r31 + - name: mysqld-exporter + image: docker.io/bitnami/mysqld-exporter:0.15.0-debian-11-r24 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 8.0.34 + created: "2023-08-24T14:38:37.8962761Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: MySQL is a fast, reliable, scalable, and easy to use open source + relational database system. Designed to handle mission-critical, heavy-load + production applications. + digest: 1a142c3153784486c7f7d886cc67210cc8640ed03881188aff509367f8f51a20 + home: https://bitnami.com + icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png + keywords: + - mysql + - database + - sql + - cluster + - high availability + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: mysql + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/mysql + urls: + - assets/bitnami/mysql-9.12.0.tgz + version: 9.12.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: MySQL @@ -34291,6 +34691,102 @@ entries: - assets/f5/nginx-service-mesh-0.2.100.tgz version: 0.2.100 nri-bundle: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: New Relic + catalog.cattle.io/release-name: nri-bundle + apiVersion: v2 + created: "2023-08-24T14:39:08.87431449Z" + dependencies: + - condition: infrastructure.enabled,newrelic-infrastructure.enabled + name: newrelic-infrastructure + repository: file://./charts/newrelic-infrastructure + version: 3.21.0 + - condition: prometheus.enabled,nri-prometheus.enabled + name: nri-prometheus + repository: file://./charts/nri-prometheus + version: 2.1.17 + - condition: newrelic-prometheus-agent.enabled + name: newrelic-prometheus-agent + repository: file://./charts/newrelic-prometheus-agent + version: 1.2.3 + - condition: webhook.enabled,nri-metadata-injection.enabled + name: nri-metadata-injection + repository: file://./charts/nri-metadata-injection + version: 4.4.0 + - condition: metrics-adapter.enabled,newrelic-k8s-metrics-adapter.enabled + name: newrelic-k8s-metrics-adapter + repository: file://./charts/newrelic-k8s-metrics-adapter + version: 1.2.1 + - condition: ksm.enabled,kube-state-metrics.enabled + name: kube-state-metrics + repository: file://./charts/kube-state-metrics + version: 4.23.0 + - condition: kubeEvents.enabled,nri-kube-events.enabled + name: nri-kube-events + repository: file://./charts/nri-kube-events + version: 3.1.2 + - condition: logging.enabled,newrelic-logging.enabled + name: newrelic-logging + repository: file://./charts/newrelic-logging + version: 1.18.1 + - condition: newrelic-pixie.enabled + name: newrelic-pixie + repository: file://./charts/newrelic-pixie + version: 2.1.2 + - alias: pixie-chart + condition: pixie-chart.enabled + name: pixie-operator-chart + repository: file://./charts/pixie-operator-chart + version: 0.1.4 + - condition: newrelic-infra-operator.enabled + name: newrelic-infra-operator + repository: file://./charts/newrelic-infra-operator + version: 2.2.2 + description: Groups together the individual charts for the New Relic Kubernetes + solution for a more comfortable deployment. + digest: 215bc3f92687181ff75c9d4c0eaaea435d10ebd799c46dbc1fafb6da1939dac4 + home: https://github.com/newrelic/helm-charts + icon: https://newrelic.com/themes/custom/erno/assets/mediakit/new_relic_logo_vertical.svg + keywords: + - infrastructure + - newrelic + - monitoring + maintainers: + - name: nserrino + url: https://github.com/nserrino + - name: philkuz + url: https://github.com/philkuz + - name: htroisi + url: https://github.com/htroisi + - name: juanjjaramillo + url: https://github.com/juanjjaramillo + - name: svetlanabrennan + url: https://github.com/svetlanabrennan + - name: nrepai + url: https://github.com/nrepai + - name: csongnr + url: https://github.com/csongnr + - name: vuqtran88 + url: https://github.com/vuqtran88 + - name: xqi-nr + url: https://github.com/xqi-nr + name: nri-bundle + sources: + - https://github.com/newrelic/nri-bundle/ + - https://github.com/newrelic/nri-bundle/tree/master/charts/nri-bundle + - https://github.com/newrelic/nri-kubernetes/tree/master/charts/newrelic-infrastructure + - https://github.com/newrelic/nri-prometheus/tree/master/charts/nri-prometheus + - https://github.com/newrelic/newrelic-prometheus-configurator/tree/master/charts/newrelic-prometheus-agent + - https://github.com/newrelic/k8s-metadata-injection/tree/master/charts/nri-metadata-injection + - https://github.com/newrelic/newrelic-k8s-metrics-adapter/tree/master/charts/newrelic-k8s-metrics-adapter + - https://github.com/newrelic/nri-kube-events/tree/master/charts/nri-kube-events + - https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-logging + - https://github.com/newrelic/helm-charts/tree/master/charts/newrelic-pixie + - https://github.com/newrelic/newrelic-infra-operator/tree/master/charts/newrelic-infra-operator + urls: + - assets/new-relic/nri-bundle-5.0.26.tgz + version: 5.0.26 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: New Relic @@ -38102,6 +38598,51 @@ entries: - assets/portworx/portworx-essentials-2.9.100.tgz version: 2.9.100 postgresql: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: PostgreSQL + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: postgresql + category: Database + images: | + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + - name: postgres-exporter + image: docker.io/bitnami/postgres-exporter:0.13.2-debian-11-r25 + - name: postgresql + image: docker.io/bitnami/postgresql:15.4.0-debian-11-r10 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 15.4.0 + created: "2023-08-24T14:38:38.189502563Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: PostgreSQL (Postgres) is an open source object-relational database + known for reliability and data integrity. ACID-compliant, it supports foreign + keys, joins, views, triggers and stored procedures. + digest: 6bde136f733895f696a05b71667593199a0f516a68926b12737e8f1c27811cdb + home: https://bitnami.com + icon: https://wiki.postgresql.org/images/a/a4/PostgreSQL_logo.3colors.svg + keywords: + - postgresql + - postgres + - database + - sql + - replication + - cluster + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: postgresql + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/postgresql + urls: + - assets/bitnami/postgresql-12.9.0.tgz + version: 12.9.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: PostgreSQL @@ -40511,6 +41052,50 @@ entries: - assets/quobyte/quobyte-cluster-0.1.5.tgz version: 0.1.5 redis: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Redis + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: redis + category: Database + images: | + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + - name: redis-exporter + image: docker.io/bitnami/redis-exporter:1.52.0-debian-11-r23 + - name: redis-sentinel + image: docker.io/bitnami/redis-sentinel:7.2.0-debian-11-r3 + - name: redis + image: docker.io/bitnami/redis:7.2.0-debian-11-r3 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 7.2.0 + created: "2023-08-24T14:38:38.316733937Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Redis(R) is an open source, advanced key-value store. It is often + referred to as a data structure server since keys can contain strings, hashes, + lists, sets and sorted sets. + digest: 33cb63b66f4ce0e686e1b2487651d44410e04c6263e38c76e95357cca7a4c5ca + home: https://bitnami.com + icon: https://redis.com/wp-content/uploads/2021/08/redis-logo.png + keywords: + - redis + - keyvalue + - database + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: redis + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/redis + urls: + - assets/bitnami/redis-17.16.0.tgz + version: 17.16.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Redis @@ -42127,6 +42712,50 @@ entries: - assets/bitnami/redis-17.3.7.tgz version: 17.3.7 redpanda: + - annotations: + artifacthub.io/images: | + - name: redpanda + image: docker.redpanda.com/redpandadata/redpanda:v23.2.6 + - name: busybox + image: busybox:latest + - name: mintel/docker-alpine-bash-curl-jq + image: mintel/docker-alpine-bash-curl-jq:latest + artifacthub.io/license: Apache-2.0 + artifacthub.io/links: | + - name: Documentation + url: https://docs.redpanda.com + - name: "Helm (>= 3.6.0)" + url: https://helm.sh/docs/intro/install/ + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Redpanda + catalog.cattle.io/kube-version: '>=1.21-0' + catalog.cattle.io/release-name: redpanda + apiVersion: v2 + appVersion: v23.2.6 + created: "2023-08-24T14:39:09.69881918Z" + dependencies: + - condition: console.enabled + name: console + repository: file://./charts/console + version: '>=0.5 <1.0' + - condition: connectors.enabled + name: connectors + repository: file://./charts/connectors + version: '>=0.1.2 <1.0' + description: Redpanda is the real-time engine for modern apps. + digest: 504d8f7b2f8dc7a8248658bf9fbce99f41cc97bc454c64ef3025eb670b8adea2 + icon: https://images.ctfassets.net/paqvtpyf8rwu/3cYHw5UzhXCbKuR24GDFGO/73fb682e6157d11c10d5b2b5da1d5af0/skate-stand-panda.svg + kubeVersion: '>=1.21-0' + maintainers: + - name: redpanda-data + url: https://github.com/orgs/redpanda-data/people + name: redpanda + sources: + - https://github.com/redpanda-data/helm-charts + type: application + urls: + - assets/redpanda/redpanda-5.1.5.tgz + version: 5.1.5 - annotations: artifacthub.io/images: | - name: redpanda @@ -45537,6 +46166,43 @@ entries: - assets/shipa/shipa-1.4.0.tgz version: 1.4.0 spark: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Apache Spark + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: spark + category: Infrastructure + images: | + - name: spark + image: docker.io/bitnami/spark:3.4.1-debian-11-r48 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 3.4.1 + created: "2023-08-24T14:38:38.58313482Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Apache Spark is a high-performance engine for large-scale computing + tasks, such as data processing, machine learning and real-time data streaming. + It includes APIs for Java, Python, Scala and R. + digest: ef5d5cea4c176b952b54ef3fac49f2e4371b6a3229c92b97410db9db25d0765a + home: https://bitnami.com + icon: https://www.apache.org/logos/res/spark/default.png + keywords: + - apache + - spark + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: spark + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/spark + urls: + - assets/bitnami/spark-7.1.5.tgz + version: 7.1.5 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Apache Spark @@ -46506,6 +47172,37 @@ entries: - assets/bitnami/spark-6.3.8.tgz version: 6.3.8 speedscale-operator: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Speedscale Operator + catalog.cattle.io/kube-version: '>= 1.17.0-0' + catalog.cattle.io/release-name: speedscale-operator + apiVersion: v1 + appVersion: 1.3.320 + created: "2023-08-24T14:39:09.793609655Z" + description: Stress test your APIs with real world scenarios. Collect and replay + traffic without scripting. + digest: 57a5f194452b5cccbc9ddece97fa4994edc001eac7f44c9e13c1a887ceecb3d7 + home: https://speedscale.com + icon: https://raw.githubusercontent.com/speedscale/assets/main/logo/gold_logo_only.png + keywords: + - speedscale + - test + - testing + - regression + - reliability + - load + - replay + - network + - traffic + kubeVersion: '>= 1.17.0-0' + maintainers: + - email: support@speedscale.com + name: Speedscale Support + name: speedscale-operator + urls: + - assets/speedscale/speedscale-operator-1.3.28.tgz + version: 1.3.28 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Speedscale Operator @@ -49614,6 +50311,51 @@ entries: - assets/intel/tcs-issuer-0.1.0.tgz version: 0.1.0 tomcat: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Apache Tomcat + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: tomcat + category: ApplicationServer + images: | + - name: jmx-exporter + image: docker.io/bitnami/jmx-exporter:0.19.0-debian-11-r49 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + - name: tomcat + image: docker.io/bitnami/tomcat:10.1.12-debian-11-r4 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 10.1.12 + created: "2023-08-24T14:38:38.586998431Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Apache Tomcat is an open-source web server designed to host and run + Java-based web applications. It is a lightweight server with a good performance + for applications running in production environments. + digest: d175721758cec593f4fc366143cda08b9cb585246bec99e44b345be74c77fd02 + home: https://bitnami.com + icon: https://svn.apache.org/repos/asf/comdev/project-logos/originals/tomcat.svg + keywords: + - tomcat + - java + - http + - web + - application server + - jsp + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: tomcat + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/tomcat + urls: + - assets/bitnami/tomcat-10.10.0.tgz + version: 10.10.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Apache Tomcat @@ -52794,6 +53536,60 @@ entries: - assets/hashicorp/vault-0.22.0.tgz version: 0.22.0 wordpress: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: WordPress + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: wordpress + category: CMS + images: | + - name: apache-exporter + image: docker.io/bitnami/apache-exporter:1.0.1-debian-11-r23 + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r45 + - name: wordpress + image: docker.io/bitnami/wordpress:6.3.0-debian-11-r13 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 6.3.0 + created: "2023-08-24T14:38:39.465539115Z" + dependencies: + - condition: memcached.enabled + name: memcached + repository: file://./charts/memcached + version: 6.x.x + - condition: mariadb.enabled + name: mariadb + repository: file://./charts/mariadb + version: 13.x.x + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: WordPress is the world's most popular blogging and content management + platform. Powerful yet simple, everyone from students to global corporations + use it to build beautiful, functional websites. + digest: 112e273aa963a2a98cd4ddbd689260f076094d0cad87e3c488f47aec3984abd7 + home: https://bitnami.com + icon: https://s.w.org/style/images/about/WordPress-logotype-simplified.png + keywords: + - application + - blog + - cms + - http + - php + - web + - wordpress + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: wordpress + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/wordpress + urls: + - assets/bitnami/wordpress-17.1.2.tgz + version: 17.1.2 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: WordPress @@ -57067,6 +57863,43 @@ entries: - assets/netfoundry/ziti-host-1.5.1.tgz version: 1.5.1 zookeeper: + - annotations: + catalog.cattle.io/certified: partner + catalog.cattle.io/display-name: Apache Zookeeper + catalog.cattle.io/kube-version: '>=1.19-0' + catalog.cattle.io/release-name: zookeeper + category: Infrastructure + images: | + - name: os-shell + image: docker.io/bitnami/os-shell:11-debian-11-r43 + - name: zookeeper + image: docker.io/bitnami/zookeeper:3.9.0-debian-11-r1 + licenses: Apache-2.0 + apiVersion: v2 + appVersion: 3.9.0 + created: "2023-08-24T14:38:39.554176075Z" + dependencies: + - name: common + repository: file://./charts/common + tags: + - bitnami-common + version: 2.x.x + description: Apache ZooKeeper provides a reliable, centralized register of configuration + data and services for distributed applications. + digest: af64bb80445511e99f220643985662219a2b27daea66fbca07a4a04b5333df50 + home: https://bitnami.com + icon: https://svn.apache.org/repos/asf/comdev/project-logos/originals/zookeeper.svg + keywords: + - zookeeper + maintainers: + - name: VMware, Inc. + url: https://github.com/bitnami/charts + name: zookeeper + sources: + - https://github.com/bitnami/charts/tree/main/bitnami/zookeeper + urls: + - assets/bitnami/zookeeper-12.1.0.tgz + version: 12.1.0 - annotations: catalog.cattle.io/certified: partner catalog.cattle.io/display-name: Apache Zookeeper