diff --git a/chart/kubeapps/Chart.yaml b/chart/kubeapps/Chart.yaml index 101a1f2a138..0e836103499 100644 --- a/chart/kubeapps/Chart.yaml +++ b/chart/kubeapps/Chart.yaml @@ -52,4 +52,4 @@ maintainers: name: kubeapps sources: - https://github.com/bitnami/charts/tree/main/bitnami/kubeapps -version: 14.0.2-dev +version: 14.0.3-dev diff --git a/chart/kubeapps/templates/apprepository/apprepositories-secret.yaml b/chart/kubeapps/templates/apprepository/apprepositories-secret.yaml index 5bde633923c..e5f8ed064c2 100644 --- a/chart/kubeapps/templates/apprepository/apprepositories-secret.yaml +++ b/chart/kubeapps/templates/apprepository/apprepositories-secret.yaml @@ -4,6 +4,8 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{- if .Values.packaging.helm.enabled }} +{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }} +{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} {{- range .Values.apprepository.initialRepos }} {{- if or .caCert .authorizationHeader .basicAuth }} apiVersion: v1 @@ -11,7 +13,7 @@ kind: Secret metadata: name: {{ printf "apprepo-%s-secrets" .name }} namespace: {{ default (include "kubeapps.helmGlobalPackagingNamespace" $) .namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + 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 }} @@ -38,7 +40,7 @@ kind: Secret metadata: name: {{ printf "%s-apprepo-%s" (default (include "kubeapps.helmGlobalPackagingNamespace" $) .namespace) .name }} namespace: {{ $.Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + 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 }} diff --git a/chart/kubeapps/templates/apprepository/apprepositories.yaml b/chart/kubeapps/templates/apprepository/apprepositories.yaml index 0c9ac2dba98..b3688ce2662 100644 --- a/chart/kubeapps/templates/apprepository/apprepositories.yaml +++ b/chart/kubeapps/templates/apprepository/apprepositories.yaml @@ -4,13 +4,15 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{- if .Values.packaging.helm.enabled }} +{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }} +{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} {{- range .Values.apprepository.initialRepos }} apiVersion: kubeapps.com/v1alpha1 kind: AppRepository metadata: name: {{ .name }} namespace: {{ default (include "kubeapps.helmGlobalPackagingNamespace" $) .namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} + 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 }} diff --git a/chart/kubeapps/templates/apprepository/deployment.yaml b/chart/kubeapps/templates/apprepository/deployment.yaml index 2ac0f25b356..f7961875e34 100644 --- a/chart/kubeapps/templates/apprepository/deployment.yaml +++ b/chart/kubeapps/templates/apprepository/deployment.yaml @@ -9,7 +9,9 @@ kind: Deployment metadata: name: {{ template "kubeapps.apprepository.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -19,7 +21,7 @@ spec: {{- if .Values.apprepository.updateStrategy }} strategy: {{- toYaml .Values.apprepository.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apprepository.podLabels .Values.commonLabels ) "context" . ) }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.apprepository.podLabels .Values.commonLabels $versionLabel ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: apprepository diff --git a/chart/kubeapps/templates/apprepository/rbac.yaml b/chart/kubeapps/templates/apprepository/rbac.yaml index 93f93286476..b59df30fff7 100644 --- a/chart/kubeapps/templates/apprepository/rbac.yaml +++ b/chart/kubeapps/templates/apprepository/rbac.yaml @@ -4,6 +4,8 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{- if .Values.packaging.helm.enabled }} +{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }} +{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} {{- if .Values.rbac.create -}} # Role for managing events, jobs and cronjobs in the release namespace apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} @@ -11,7 +13,7 @@ kind: Role metadata: name: {{ template "kubeapps.apprepository.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -72,7 +74,7 @@ kind: RoleBinding metadata: name: {{ template "kubeapps.apprepository.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -111,7 +113,7 @@ kind: Role metadata: name: {{ printf "%s-repositories-read" .Release.Name }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -131,7 +133,7 @@ kind: Role metadata: name: {{ printf "%s-repositories-write" .Release.Name }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -157,7 +159,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "kubeapps:%s:apprepositories-read" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository rbac.authorization.k8s.io/aggregate-to-view: "true" {{- if .Values.commonAnnotations }} @@ -178,7 +180,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRoleBinding metadata: name: {{ printf "kubeapps:controller:%s:apprepositories-read" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -196,7 +198,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "kubeapps:%s:apprepositories-write" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository rbac.authorization.k8s.io/aggregate-to-edit: "true" {{- if .Values.commonAnnotations }} @@ -220,7 +222,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "kubeapps:%s:apprepositories-refresh" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -239,7 +241,7 @@ kind: RoleBinding metadata: name: {{ printf "kubeapps:%s:global-repos-read" .Release.Namespace | quote }} namespace: {{ include "kubeapps.helmGlobalPackagingNamespace" . | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + 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 }} diff --git a/chart/kubeapps/templates/apprepository/serviceaccount.yaml b/chart/kubeapps/templates/apprepository/serviceaccount.yaml index 2fe6bd6c8f7..00d563529bb 100644 --- a/chart/kubeapps/templates/apprepository/serviceaccount.yaml +++ b/chart/kubeapps/templates/apprepository/serviceaccount.yaml @@ -9,7 +9,9 @@ kind: ServiceAccount metadata: name: {{ template "kubeapps.apprepository.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.apprepository.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: apprepository {{- if or .Values.apprepository.serviceAccount.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.apprepository.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }} diff --git a/chart/kubeapps/templates/dashboard/configmap.yaml b/chart/kubeapps/templates/dashboard/configmap.yaml index ea4bc9796fb..af217e5660d 100644 --- a/chart/kubeapps/templates/dashboard/configmap.yaml +++ b/chart/kubeapps/templates/dashboard/configmap.yaml @@ -9,7 +9,9 @@ kind: ConfigMap metadata: name: {{ template "kubeapps.dashboard-config.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.dashboard.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: dashboard {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/chart/kubeapps/templates/dashboard/deployment.yaml b/chart/kubeapps/templates/dashboard/deployment.yaml index 6db6c490a8a..12b27876a5c 100644 --- a/chart/kubeapps/templates/dashboard/deployment.yaml +++ b/chart/kubeapps/templates/dashboard/deployment.yaml @@ -9,7 +9,9 @@ kind: Deployment metadata: name: {{ template "kubeapps.dashboard.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.dashboard.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: dashboard {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -19,7 +21,7 @@ spec: {{- if .Values.dashboard.updateStrategy }} strategy: {{- toYaml .Values.dashboard.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.dashboard.podLabels .Values.commonLabels ) "context" . ) }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.dashboard.podLabels .Values.commonLabels $versionLabel ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: dashboard diff --git a/chart/kubeapps/templates/dashboard/service.yaml b/chart/kubeapps/templates/dashboard/service.yaml index 6dc7507ae5a..0f9da93ba28 100644 --- a/chart/kubeapps/templates/dashboard/service.yaml +++ b/chart/kubeapps/templates/dashboard/service.yaml @@ -9,7 +9,9 @@ kind: Service metadata: name: {{ template "kubeapps.dashboard.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.dashboard.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: dashboard {{- if or .Values.dashboard.service.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.dashboard.service.annotations .Values.commonAnnotations ) "context" . ) }} diff --git a/chart/kubeapps/templates/frontend/configmap.yaml b/chart/kubeapps/templates/frontend/configmap.yaml index 21352355d29..44c10132b52 100644 --- a/chart/kubeapps/templates/frontend/configmap.yaml +++ b/chart/kubeapps/templates/frontend/configmap.yaml @@ -8,7 +8,9 @@ kind: ConfigMap metadata: name: {{ template "kubeapps.frontend-config.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.frontend.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: frontend {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/chart/kubeapps/templates/frontend/deployment.yaml b/chart/kubeapps/templates/frontend/deployment.yaml index 33212c0a050..baf54af8588 100644 --- a/chart/kubeapps/templates/frontend/deployment.yaml +++ b/chart/kubeapps/templates/frontend/deployment.yaml @@ -8,7 +8,9 @@ kind: Deployment metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.frontend.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: frontend {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -18,7 +20,7 @@ spec: {{- if .Values.frontend.updateStrategy }} strategy: {{- toYaml .Values.frontend.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.frontend.podLabels .Values.commonLabels ) "context" . ) }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.frontend.podLabels .Values.commonLabels $versionLabel ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: frontend diff --git a/chart/kubeapps/templates/frontend/oauth2-secret.yaml b/chart/kubeapps/templates/frontend/oauth2-secret.yaml index 79620e200e3..6db0517e410 100644 --- a/chart/kubeapps/templates/frontend/oauth2-secret.yaml +++ b/chart/kubeapps/templates/frontend/oauth2-secret.yaml @@ -9,7 +9,9 @@ kind: Secret metadata: name: {{ template "kubeapps.oauth2_proxy-secret.name" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.frontend.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: frontend {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/chart/kubeapps/templates/frontend/service.yaml b/chart/kubeapps/templates/frontend/service.yaml index 74072265893..13ce55b1bc3 100644 --- a/chart/kubeapps/templates/frontend/service.yaml +++ b/chart/kubeapps/templates/frontend/service.yaml @@ -8,7 +8,9 @@ kind: Service metadata: name: {{ template "common.names.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.frontend.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: frontend {{- if or .Values.frontend.service.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.frontend.service.annotations .Values.commonAnnotations ) "context" . ) }} diff --git a/chart/kubeapps/templates/kubeappsapis/configmap.yaml b/chart/kubeapps/templates/kubeappsapis/configmap.yaml index a0ce564d284..2129cc8e0cc 100644 --- a/chart/kubeapps/templates/kubeappsapis/configmap.yaml +++ b/chart/kubeapps/templates/kubeappsapis/configmap.yaml @@ -8,7 +8,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-configmap" (include "kubeapps.kubeappsapis.fullname" .) }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + 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 }} diff --git a/chart/kubeapps/templates/kubeappsapis/deployment.yaml b/chart/kubeapps/templates/kubeappsapis/deployment.yaml index 23d2f8afbc7..38e40ddbcef 100644 --- a/chart/kubeapps/templates/kubeappsapis/deployment.yaml +++ b/chart/kubeapps/templates/kubeappsapis/deployment.yaml @@ -8,7 +8,9 @@ kind: Deployment metadata: name: {{ template "kubeapps.kubeappsapis.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -18,7 +20,7 @@ spec: {{- if .Values.kubeappsapis.updateStrategy }} strategy: {{- toYaml .Values.kubeappsapis.updateStrategy | nindent 4 }} {{- end }} - {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.kubeappsapis.podLabels .Values.commonLabels ) "context" . ) }} + {{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.kubeappsapis.podLabels .Values.commonLabels $versionLabel ) "context" . ) }} selector: matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/component: kubeappsapis diff --git a/chart/kubeapps/templates/kubeappsapis/rbac.yaml b/chart/kubeapps/templates/kubeappsapis/rbac.yaml index a9407ec83e8..d22907149d0 100644 --- a/chart/kubeapps/templates/kubeappsapis/rbac.yaml +++ b/chart/kubeapps/templates/kubeappsapis/rbac.yaml @@ -4,11 +4,13 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{- if .Values.rbac.create -}} +{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} +{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "kubeapps:%s:kubeappsapis-ns-discovery" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -25,7 +27,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRoleBinding metadata: name: {{ printf "kubeapps:%s:kubeappsapis-ns-discovery" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -44,7 +46,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: {{ printf "kubeapps:%s:kubeappsapis-operators" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -61,7 +63,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRoleBinding metadata: name: {{ printf "kubeapps:%s:kubeappsapis-operators" .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/chart/kubeapps/templates/kubeappsapis/rbac_fluxv2.yaml b/chart/kubeapps/templates/kubeappsapis/rbac_fluxv2.yaml index a1197b7e72c..1632da6f25b 100644 --- a/chart/kubeapps/templates/kubeappsapis/rbac_fluxv2.yaml +++ b/chart/kubeapps/templates/kubeappsapis/rbac_fluxv2.yaml @@ -4,12 +4,14 @@ SPDX-License-Identifier: APACHE-2.0 */}} {{- if .Values.packaging.flux.enabled }} +{{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} +{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} {{- if .Values.rbac.create -}} apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRole metadata: name: "kubeapps:controller:kubeapps-apis-fluxv2-plugin" - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -39,7 +41,7 @@ apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }} kind: ClusterRoleBinding metadata: name: "kubeapps:controller:kubeapps-apis-fluxv2-plugin" - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} diff --git a/chart/kubeapps/templates/kubeappsapis/service.yaml b/chart/kubeapps/templates/kubeappsapis/service.yaml index 0444b8c4274..85c1a6dcbe9 100644 --- a/chart/kubeapps/templates/kubeappsapis/service.yaml +++ b/chart/kubeapps/templates/kubeappsapis/service.yaml @@ -8,7 +8,9 @@ kind: Service metadata: name: {{ template "kubeapps.kubeappsapis.fullname" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if or .Values.kubeappsapis.service.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.kubeappsapis.service.annotations .Values.commonAnnotations ) "context" . ) }} diff --git a/chart/kubeapps/templates/kubeappsapis/serviceaccount.yaml b/chart/kubeapps/templates/kubeappsapis/serviceaccount.yaml index 90afa15e877..170724d001a 100644 --- a/chart/kubeapps/templates/kubeappsapis/serviceaccount.yaml +++ b/chart/kubeapps/templates/kubeappsapis/serviceaccount.yaml @@ -9,7 +9,9 @@ kind: ServiceAccount metadata: name: {{ template "kubeapps.kubeappsapis.serviceAccountName" . }} namespace: {{ .Release.Namespace | quote }} - labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} + {{- $versionLabel := dict "app.kubernetes.io/version" ( include "common.images.version" ( dict "imageRoot" .Values.kubeappsapis.image "chart" .Chart ) ) }} + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.commonLabels $versionLabel ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/component: kubeappsapis {{- if or .Values.kubeappsapis.serviceAccount.annotations .Values.commonAnnotations }} {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.kubeappsapis.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}