From 6996eabf8be92a06870695087f09b76b95f56790 Mon Sep 17 00:00:00 2001 From: David Dyball Date: Tue, 12 Sep 2023 08:22:38 +0100 Subject: [PATCH] Add Namespaces to Resources (#17) * Correctly Namespace Resources * Increase chart version --------- Co-authored-by: Narekmat <47845266+Narekmat@users.noreply.github.com> --- charts/kafka-ui/Chart.yaml | 2 +- charts/kafka-ui/templates/configmap.yaml | 3 ++- charts/kafka-ui/templates/configmap_fromValues.yaml | 3 ++- charts/kafka-ui/templates/deployment.yaml | 1 + charts/kafka-ui/templates/hpa.yaml | 1 + charts/kafka-ui/templates/ingress.yaml | 1 + charts/kafka-ui/templates/networkpolicy-egress.yaml | 1 + charts/kafka-ui/templates/networkpolicy-ingress.yaml | 1 + charts/kafka-ui/templates/secret.yaml | 3 ++- charts/kafka-ui/templates/service.yaml | 1 + charts/kafka-ui/templates/serviceaccount.yaml | 1 + 11 files changed, 14 insertions(+), 4 deletions(-) diff --git a/charts/kafka-ui/Chart.yaml b/charts/kafka-ui/Chart.yaml index a7f0cf2e8..a296f4f7d 100644 --- a/charts/kafka-ui/Chart.yaml +++ b/charts/kafka-ui/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: kafka-ui description: A Helm chart for kafka-UI type: application -version: 0.7.4 +version: 0.7.5 appVersion: v0.7.1 icon: https://github.com/provectus/kafka-ui/raw/master/documentation/images/kafka-ui-logo.png diff --git a/charts/kafka-ui/templates/configmap.yaml b/charts/kafka-ui/templates/configmap.yaml index 22d2a6994..56b2bf4dc 100644 --- a/charts/kafka-ui/templates/configmap.yaml +++ b/charts/kafka-ui/templates/configmap.yaml @@ -3,8 +3,9 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "kafka-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} data: {{- toYaml .Values.envs.config | nindent 2 }} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/charts/kafka-ui/templates/configmap_fromValues.yaml b/charts/kafka-ui/templates/configmap_fromValues.yaml index ae8b7695c..7e5823835 100644 --- a/charts/kafka-ui/templates/configmap_fromValues.yaml +++ b/charts/kafka-ui/templates/configmap_fromValues.yaml @@ -3,9 +3,10 @@ apiVersion: v1 kind: ConfigMap metadata: name: {{ include "kafka-ui.fullname" . }}-fromvalues + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} data: config.yml: |- {{- toYaml .Values.yamlApplicationConfig | nindent 4}} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/charts/kafka-ui/templates/deployment.yaml b/charts/kafka-ui/templates/deployment.yaml index 3e4ac2b4b..7a92712b8 100644 --- a/charts/kafka-ui/templates/deployment.yaml +++ b/charts/kafka-ui/templates/deployment.yaml @@ -2,6 +2,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "kafka-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} {{- with .Values.annotations }} diff --git a/charts/kafka-ui/templates/hpa.yaml b/charts/kafka-ui/templates/hpa.yaml index 1cc131c9e..77188bdc7 100644 --- a/charts/kafka-ui/templates/hpa.yaml +++ b/charts/kafka-ui/templates/hpa.yaml @@ -9,6 +9,7 @@ apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler metadata: name: {{ include "kafka-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} spec: diff --git a/charts/kafka-ui/templates/ingress.yaml b/charts/kafka-ui/templates/ingress.yaml index 24ac08572..75b107bd4 100644 --- a/charts/kafka-ui/templates/ingress.yaml +++ b/charts/kafka-ui/templates/ingress.yaml @@ -13,6 +13,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} diff --git a/charts/kafka-ui/templates/networkpolicy-egress.yaml b/charts/kafka-ui/templates/networkpolicy-egress.yaml index 4f5828027..1ba60ec1b 100644 --- a/charts/kafka-ui/templates/networkpolicy-egress.yaml +++ b/charts/kafka-ui/templates/networkpolicy-egress.yaml @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: {{ printf "%s-egress" (include "kafka-ui.fullname" .) }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} spec: diff --git a/charts/kafka-ui/templates/networkpolicy-ingress.yaml b/charts/kafka-ui/templates/networkpolicy-ingress.yaml index 74988676b..5afbc55e8 100644 --- a/charts/kafka-ui/templates/networkpolicy-ingress.yaml +++ b/charts/kafka-ui/templates/networkpolicy-ingress.yaml @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: {{ printf "%s-ingress" (include "kafka-ui.fullname" .) }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} spec: diff --git a/charts/kafka-ui/templates/secret.yaml b/charts/kafka-ui/templates/secret.yaml index 1f974503d..387666f84 100644 --- a/charts/kafka-ui/templates/secret.yaml +++ b/charts/kafka-ui/templates/secret.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: Secret metadata: name: {{ include "kafka-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} type: Opaque @@ -10,4 +11,4 @@ data: {{- range $key, $val := .Values.envs.secret }} {{ $key }}: {{ $val | b64enc | quote }} {{- end -}} -{{- end}} \ No newline at end of file +{{- end}} diff --git a/charts/kafka-ui/templates/service.yaml b/charts/kafka-ui/templates/service.yaml index 0f3868c8c..337e1457d 100644 --- a/charts/kafka-ui/templates/service.yaml +++ b/charts/kafka-ui/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "kafka-ui.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} {{- if .Values.service.annotations }} diff --git a/charts/kafka-ui/templates/serviceaccount.yaml b/charts/kafka-ui/templates/serviceaccount.yaml index b89551c83..ddefde371 100644 --- a/charts/kafka-ui/templates/serviceaccount.yaml +++ b/charts/kafka-ui/templates/serviceaccount.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "kafka-ui.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "kafka-ui.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }}