diff --git a/charts/kubernetes-dashboard/Chart.yaml b/charts/kubernetes-dashboard/Chart.yaml index 9ec8a9a50bca..a06d66d7df0d 100644 --- a/charts/kubernetes-dashboard/Chart.yaml +++ b/charts/kubernetes-dashboard/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v2 name: kubernetes-dashboard -version: 7.6.1 +version: 7.7.0 description: General-purpose web UI for Kubernetes clusters keywords: - kubernetes diff --git a/charts/kubernetes-dashboard/templates/_helpers.tpl b/charts/kubernetes-dashboard/templates/_helpers.tpl index 42c3b06033a5..08b07baaa496 100644 --- a/charts/kubernetes-dashboard/templates/_helpers.tpl +++ b/charts/kubernetes-dashboard/templates/_helpers.tpl @@ -53,6 +53,9 @@ helm.sh/chart: {{ include "kubernetes-dashboard.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/managed-by: {{ .Release.Service }} app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }} +{{- with .Values.app.labels }} +{{- toYaml . }} +{{- end }} {{- end -}} {{/* @@ -63,6 +66,15 @@ app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/part-of: {{ include "kubernetes-dashboard.name" . }} {{- end -}} +{{/* +Common annotations +*/}} +{{- define "kubernetes-dashboard.annotations" -}} +{{- with .Values.app.annotations }} +{{- toYaml . }} +{{- end }} +{{- end -}} + {{- define "kubernetes-dashboard.app.csrf.secret.name" -}} {{- printf "%s-%s" ( include "kubernetes-dashboard.fullname" . ) "csrf"}} {{- end -}} diff --git a/charts/kubernetes-dashboard/templates/_tplvalues.tpl b/charts/kubernetes-dashboard/templates/_tplvalues.tpl deleted file mode 100644 index ba8fe55c540b..000000000000 --- a/charts/kubernetes-dashboard/templates/_tplvalues.tpl +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright 2017 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -{{/* vim: set filetype=mustache: */}} -{{/* -Renders a value that contains template. -Usage: -{{ include "common.tplvalues.render" ( dict "value" .Values.path.to.the.Value "context" $) }} -*/}} -{{- define "common.tplvalues.render" -}} - {{- if typeIs "string" .value }} - {{- tpl .value .context }} - {{- else }} - {{- tpl (.value | toYaml) .context }} - {{- end }} -{{- end -}} \ No newline at end of file diff --git a/charts/kubernetes-dashboard/templates/config/gateway.yaml b/charts/kubernetes-dashboard/templates/config/gateway.yaml index 5206c2605b9d..6b5ce959e24f 100644 --- a/charts/kubernetes-dashboard/templates/config/gateway.yaml +++ b/charts/kubernetes-dashboard/templates/config/gateway.yaml @@ -19,6 +19,8 @@ kind: ConfigMap metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ .Values.kong.dblessConfig.configMap }} data: kong.yml: | diff --git a/charts/kubernetes-dashboard/templates/config/settings.yaml b/charts/kubernetes-dashboard/templates/config/settings.yaml index 3bce85237007..ea37051eae52 100644 --- a/charts/kubernetes-dashboard/templates/config/settings.yaml +++ b/charts/kubernetes-dashboard/templates/config/settings.yaml @@ -19,6 +19,8 @@ kind: ConfigMap metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.web.configMap.settings.name" . }} data: {{- with .Values.app.settings.global }} diff --git a/charts/kubernetes-dashboard/templates/deployments/api.yaml b/charts/kubernetes-dashboard/templates/deployments/api.yaml index b9d355cb9e70..094b5852b47c 100644 --- a/charts/kubernetes-dashboard/templates/deployments/api.yaml +++ b/charts/kubernetes-dashboard/templates/deployments/api.yaml @@ -18,14 +18,15 @@ metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} {{- with .Values.api.labels }} - {{ toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }} app.kubernetes.io/version: {{ .Values.api.image.tag }} app.kubernetes.io/component: {{ .Values.api.role }} annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} {{- with .Values.api.annotations }} - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 4 }} {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }} spec: diff --git a/charts/kubernetes-dashboard/templates/deployments/auth.yaml b/charts/kubernetes-dashboard/templates/deployments/auth.yaml index 7204c6b601c9..fe6129713fe7 100644 --- a/charts/kubernetes-dashboard/templates/deployments/auth.yaml +++ b/charts/kubernetes-dashboard/templates/deployments/auth.yaml @@ -21,14 +21,15 @@ metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} {{- with .Values.auth.labels }} - {{ toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }} app.kubernetes.io/version: {{ .Values.api.image.tag }} app.kubernetes.io/component: {{ .Values.auth.role }} annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} {{- with .Values.auth.annotations }} - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 4 }} {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }} spec: diff --git a/charts/kubernetes-dashboard/templates/deployments/metrics-scraper.yaml b/charts/kubernetes-dashboard/templates/deployments/metrics-scraper.yaml index 193f9a25d495..c929514f570b 100644 --- a/charts/kubernetes-dashboard/templates/deployments/metrics-scraper.yaml +++ b/charts/kubernetes-dashboard/templates/deployments/metrics-scraper.yaml @@ -20,14 +20,15 @@ metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} {{- with .Values.metricsScraper.labels }} - {{ toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }} app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }} app.kubernetes.io/component: {{ .Values.metricsScraper.role }} annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} {{- with .Values.metricsScraper.annotations }} - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 4 }} {{- end }} name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }} spec: diff --git a/charts/kubernetes-dashboard/templates/deployments/web.yaml b/charts/kubernetes-dashboard/templates/deployments/web.yaml index 160e9d29d83a..926badcb46af 100644 --- a/charts/kubernetes-dashboard/templates/deployments/web.yaml +++ b/charts/kubernetes-dashboard/templates/deployments/web.yaml @@ -20,14 +20,15 @@ metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} {{- with .Values.web.labels }} - {{ toYaml . | nindent 4 }} + {{- toYaml . | nindent 4 }} {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }} app.kubernetes.io/version: {{ .Values.web.image.tag }} app.kubernetes.io/component: {{ .Values.web.role }} annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} {{- with .Values.web.annotations }} - {{ toYaml . | nindent 8 }} + {{- toYaml . | nindent 4 }} {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }} spec: diff --git a/charts/kubernetes-dashboard/templates/extras/servicemonitor.yaml b/charts/kubernetes-dashboard/templates/extras/servicemonitor.yaml index 829aa4b42658..f43559d42403 100644 --- a/charts/kubernetes-dashboard/templates/extras/servicemonitor.yaml +++ b/charts/kubernetes-dashboard/templates/extras/servicemonitor.yaml @@ -18,17 +18,15 @@ kind: ServiceMonitor metadata: name: {{ template "kubernetes-dashboard.fullname" . }} labels: - {{- include "kubernetes-dashboard.labels" . | nindent 4 }} - {{- if .Values.app.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.app.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.extras.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.extras.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.extras.serviceMonitor.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} annotations: - {{- if .Values.extras.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.extras.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.extras.serviceMonitor.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: endpoints: - port: https diff --git a/charts/kubernetes-dashboard/templates/networking/ingress.yaml b/charts/kubernetes-dashboard/templates/networking/ingress.yaml index 883a8d323f96..9bdf665d9b4d 100644 --- a/charts/kubernetes-dashboard/templates/networking/ingress.yaml +++ b/charts/kubernetes-dashboard/templates/networking/ingress.yaml @@ -24,6 +24,7 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} {{- if eq .Values.app.ingress.issuer.scope "default" }} cert-manager.io/issuer: {{ .Values.app.ingress.issuer.name }} {{- end }} diff --git a/charts/kubernetes-dashboard/templates/rbac/api/role.yaml b/charts/kubernetes-dashboard/templates/rbac/api/role.yaml index 6196d51f4a78..62015577b8e4 100644 --- a/charts/kubernetes-dashboard/templates/rbac/api/role.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/api/role.yaml @@ -19,6 +19,14 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.api.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.api.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }} rules: # Allow Dashboard API to get metrics from metrics-scraper. diff --git a/charts/kubernetes-dashboard/templates/rbac/api/rolebinding.yaml b/charts/kubernetes-dashboard/templates/rbac/api/rolebinding.yaml index 731add109317..273c5d90fe14 100644 --- a/charts/kubernetes-dashboard/templates/rbac/api/rolebinding.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/api/rolebinding.yaml @@ -19,6 +19,14 @@ kind: RoleBinding metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.api.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.api.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/charts/kubernetes-dashboard/templates/rbac/api/serviceaccount.yaml b/charts/kubernetes-dashboard/templates/rbac/api/serviceaccount.yaml index 5c57639d3742..88282b02a155 100644 --- a/charts/kubernetes-dashboard/templates/rbac/api/serviceaccount.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/api/serviceaccount.yaml @@ -19,6 +19,14 @@ kind: ServiceAccount metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.api.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.api.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }} {{- end -}} diff --git a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrole.yaml b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrole.yaml index bcfc86425787..237434baca43 100644 --- a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrole.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrole.yaml @@ -19,6 +19,14 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.metricsScraper.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.metricsScraper.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }} rules: # Allow Metrics Scraper to get metrics from the Metrics server diff --git a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrolebinding.yaml b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrolebinding.yaml index 1a28e150520b..774a2e11224b 100644 --- a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrolebinding.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/clusterrolebinding.yaml @@ -19,6 +19,14 @@ kind: ClusterRoleBinding metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.metricsScraper.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.metricsScraper.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/serviceaccount.yaml b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/serviceaccount.yaml index 3cef953f8868..fbc3a0d0c88f 100644 --- a/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/serviceaccount.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/metrics-scraper/serviceaccount.yaml @@ -19,6 +19,14 @@ kind: ServiceAccount metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.metricsScraper.labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.metricsScraper.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.metricsScraper.role }} {{- end -}} diff --git a/charts/kubernetes-dashboard/templates/rbac/web/role.yaml b/charts/kubernetes-dashboard/templates/rbac/web/role.yaml index ed18fccc556d..b5a9c1997942 100644 --- a/charts/kubernetes-dashboard/templates/rbac/web/role.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/web/role.yaml @@ -19,6 +19,8 @@ apiVersion: rbac.authorization.k8s.io/v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }} rules: # Allow Dashboard Web to get and update 'kubernetes-dashboard-settings' config map. diff --git a/charts/kubernetes-dashboard/templates/rbac/web/rolebinding.yaml b/charts/kubernetes-dashboard/templates/rbac/web/rolebinding.yaml index 0b1db3ae4dc4..5ca5ae7a7440 100644 --- a/charts/kubernetes-dashboard/templates/rbac/web/rolebinding.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/web/rolebinding.yaml @@ -19,6 +19,8 @@ kind: RoleBinding metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }} roleRef: apiGroup: rbac.authorization.k8s.io diff --git a/charts/kubernetes-dashboard/templates/rbac/web/serviceaccount.yaml b/charts/kubernetes-dashboard/templates/rbac/web/serviceaccount.yaml index ae5d1d926d20..27acdaf05b84 100644 --- a/charts/kubernetes-dashboard/templates/rbac/web/serviceaccount.yaml +++ b/charts/kubernetes-dashboard/templates/rbac/web/serviceaccount.yaml @@ -19,6 +19,8 @@ kind: ServiceAccount metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }} {{- end -}} diff --git a/charts/kubernetes-dashboard/templates/secrets/csrf.yaml b/charts/kubernetes-dashboard/templates/secrets/csrf.yaml index 4ddaf63f6d8e..6f02d95146f6 100644 --- a/charts/kubernetes-dashboard/templates/secrets/csrf.yaml +++ b/charts/kubernetes-dashboard/templates/secrets/csrf.yaml @@ -17,6 +17,8 @@ kind: Secret metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.app.csrf.secret.name" . }} data: {{ (include "kubernetes-dashboard.app.csrf.secret.value" . ) -}} diff --git a/charts/kubernetes-dashboard/templates/security/networkpolicy.yaml b/charts/kubernetes-dashboard/templates/security/networkpolicy.yaml index efaf5512c9a2..efc0fd9671d6 100755 --- a/charts/kubernetes-dashboard/templates/security/networkpolicy.yaml +++ b/charts/kubernetes-dashboard/templates/security/networkpolicy.yaml @@ -16,16 +16,11 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: - name: {{ template "kubernetes-dashboard.fullname" . }} labels: - {{- include "kubernetes-dashboard.labels" . | nindent 4 }} - {{- if .Values.app.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.app.labels "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.labels" . | nindent 4 }} annotations: - {{- if .Values.app.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.app.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + name: {{ template "kubernetes-dashboard.fullname" . }} spec: podSelector: matchLabels: diff --git a/charts/kubernetes-dashboard/templates/security/pdb.yaml b/charts/kubernetes-dashboard/templates/security/pdb.yaml index 701d9c942f23..dc2bedb0e9c8 100644 --- a/charts/kubernetes-dashboard/templates/security/pdb.yaml +++ b/charts/kubernetes-dashboard/templates/security/pdb.yaml @@ -17,14 +17,9 @@ apiVersion: policy/v1 kind: PodDisruptionBudget metadata: labels: - {{- include "kubernetes-dashboard.labels" . | nindent 4 }} - {{- if .Values.app.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.app.labels "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.labels" . | nindent 4 }} annotations: - {{- if .Values.app.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.app.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} name: {{ template "kubernetes-dashboard.fullname" . }} spec: selector: diff --git a/charts/kubernetes-dashboard/templates/services/api.yaml b/charts/kubernetes-dashboard/templates/services/api.yaml index a392fd16f2aa..79733c6ee43f 100644 --- a/charts/kubernetes-dashboard/templates/services/api.yaml +++ b/charts/kubernetes-dashboard/templates/services/api.yaml @@ -17,9 +17,17 @@ apiVersion: v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.api.serviceLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.api.role }} app.kubernetes.io/version: {{ .Values.api.image.tag }} app.kubernetes.io/component: {{ .Values.api.role }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.api.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.api.role }} spec: ports: diff --git a/charts/kubernetes-dashboard/templates/services/auth.yaml b/charts/kubernetes-dashboard/templates/services/auth.yaml index 388f47b6ad05..8abb437c24f0 100644 --- a/charts/kubernetes-dashboard/templates/services/auth.yaml +++ b/charts/kubernetes-dashboard/templates/services/auth.yaml @@ -19,9 +19,17 @@ apiVersion: v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.auth.serviceLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.auth.role }} app.kubernetes.io/version: {{ .Values.auth.image.tag }} app.kubernetes.io/component: {{ .Values.auth.role }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.auth.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.auth.role }} spec: ports: diff --git a/charts/kubernetes-dashboard/templates/services/metrics-scraper.yaml b/charts/kubernetes-dashboard/templates/services/metrics-scraper.yaml index 415479dc243c..9c3d95ed5f43 100644 --- a/charts/kubernetes-dashboard/templates/services/metrics-scraper.yaml +++ b/charts/kubernetes-dashboard/templates/services/metrics-scraper.yaml @@ -19,9 +19,17 @@ apiVersion: v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.metricsScraper.serviceLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.metricsScraper.role }} app.kubernetes.io/version: {{ .Values.metricsScraper.image.tag }} app.kubernetes.io/component: {{ .Values.metricsScraper.role }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.metricsScraper.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.metrics-scraper.name" . }} spec: ports: diff --git a/charts/kubernetes-dashboard/templates/services/web.yaml b/charts/kubernetes-dashboard/templates/services/web.yaml index fba8bc5dd5cb..c2382104c39d 100644 --- a/charts/kubernetes-dashboard/templates/services/web.yaml +++ b/charts/kubernetes-dashboard/templates/services/web.yaml @@ -19,9 +19,17 @@ apiVersion: v1 metadata: labels: {{- include "kubernetes-dashboard.labels" . | nindent 4 }} + {{- with .Values.web.serviceLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} app.kubernetes.io/name: {{ template "kubernetes-dashboard.name" . }}-{{ .Values.web.role }} app.kubernetes.io/version: {{ .Values.web.image.tag }} app.kubernetes.io/component: {{ .Values.web.role }} + annotations: + {{- include "kubernetes-dashboard.annotations" . | nindent 4 }} + {{- with .Values.web.serviceAnnotations }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ template "kubernetes-dashboard.fullname" . }}-{{ .Values.web.role }} spec: ports: diff --git a/charts/kubernetes-dashboard/values.yaml b/charts/kubernetes-dashboard/values.yaml index 714067ad79e9..e07eeb121784 100644 --- a/charts/kubernetes-dashboard/values.yaml +++ b/charts/kubernetes-dashboard/values.yaml @@ -171,9 +171,11 @@ auth: - name: tmp-volume emptyDir: {} nodeSelector: {} - # Labels & annotations shared between API related resources + # Labels & annotations for Auth related resources labels: {} annotations: {} + serviceLabels: {} + serviceAnnotations: {} # API deployment configuration api: @@ -226,9 +228,11 @@ api: - name: tmp-volume emptyDir: {} nodeSelector: {} - # Labels & annotations shared between API related resources + # Labels & annotations for API related resources labels: {} annotations: {} + serviceLabels: {} + serviceAnnotations: {} # WEB UI deployment configuration web: @@ -281,9 +285,11 @@ web: - name: tmp-volume emptyDir: {} nodeSelector: {} - # Labels & annotations shared between WEB UI related resources + # Labels & annotations for WEB UI related resources labels: {} annotations: {} + serviceLabels: {} + serviceAnnotations: {} ### Metrics Scraper ### Container to scrape, store, and retrieve a window of time from the Metrics Server. @@ -340,9 +346,11 @@ metricsScraper: - name: tmp-volume emptyDir: {} nodeSelector: {} - # Labels & annotations shared between WEB UI related resources + # Labels & annotations for Metrics Scraper related resources labels: {} annotations: {} + serviceLabels: {} + serviceAnnotations: {} ## Optional Metrics Server sub-chart configuration ## Enable this if you don't already have metrics-server enabled on your cluster and