diff --git a/plugins/contrib/charts/namespace/templates/namespace.yaml b/plugins/contrib/charts/namespace/templates/namespace.yaml index 1d9b23cb0b..e9dea08a41 100644 --- a/plugins/contrib/charts/namespace/templates/namespace.yaml +++ b/plugins/contrib/charts/namespace/templates/namespace.yaml @@ -6,4 +6,10 @@ metadata: kontinuous/mainNamespace: "true" labels: application: {{ .Values.global.repositoryName }} + {{ if gt (len .Values.labels) 0 }} + {{- .Values.labels | toYaml | nindent 4 }} + {{ end }} + {{ if and .Values.global.namespaceLabels (gt (len .Values.global.namespaceLabels) 0) }} + {{- .Values.global.namespaceLabels | toYaml | nindent 4 }} + {{ end }} name: {{ or .Values.namespace .Values.global.namespace }} \ No newline at end of file diff --git a/plugins/contrib/charts/namespace/values.yaml b/plugins/contrib/charts/namespace/values.yaml index 4c3f15b169..5a9c10a6ee 100644 --- a/plugins/contrib/charts/namespace/values.yaml +++ b/plugins/contrib/charts/namespace/values.yaml @@ -4,3 +4,4 @@ ttl: limitMax: cpu: 3 memory: 8Gi +labels: {} \ No newline at end of file diff --git a/plugins/contrib/charts/rancher-namespace/templates/namespace.yaml b/plugins/contrib/charts/rancher-namespace/templates/namespace.yaml index dd5b30224a..d8f72f86d0 100644 --- a/plugins/contrib/charts/rancher-namespace/templates/namespace.yaml +++ b/plugins/contrib/charts/rancher-namespace/templates/namespace.yaml @@ -8,4 +8,10 @@ metadata: kapp.k14s.io/exists: "" labels: application: {{ .Values.global.repositoryName }} + {{ if gt (len .Values.labels) 0 }} + {{- .Values.labels | toYaml | nindent 4 }} + {{ end }} + {{ if and .Values.global.namespaceLabels (gt (len .Values.global.namespaceLabels) 0) }} + {{- .Values.global.namespaceLabels | toYaml | nindent 4 }} + {{ end }} name: {{ or .Values.namespace .Values.global.namespace }} \ No newline at end of file diff --git a/plugins/contrib/charts/rancher-namespace/values.yaml b/plugins/contrib/charts/rancher-namespace/values.yaml index 637b984c8f..7d17497338 100644 --- a/plugins/contrib/charts/rancher-namespace/values.yaml +++ b/plugins/contrib/charts/rancher-namespace/values.yaml @@ -4,4 +4,5 @@ ttl: limitMax: cpu: 3 memory: 8Gi -kapp: false \ No newline at end of file +kapp: false +labels: {} \ No newline at end of file