diff --git a/templates/cm-config.yaml b/templates/cm-config.yaml index d5263fe..1f9bc1f 100644 --- a/templates/cm-config.yaml +++ b/templates/cm-config.yaml @@ -5,6 +5,9 @@ kind: ConfigMap apiVersion: v1 metadata: name: {{ include "krakend.fullname" . }}-config + namespace: {{ .Release.Namespace }} + labels: + {{- include "krakend.labels" . | nindent 4 }} {{- if .Values.krakend.configFileSource }} binaryData: {{ include "krakend.configFileName" . }}: |- diff --git a/templates/cm-partials.yaml b/templates/cm-partials.yaml index cebb721..e10df13 100644 --- a/templates/cm-partials.yaml +++ b/templates/cm-partials.yaml @@ -3,6 +3,9 @@ kind: ConfigMap apiVersion: v1 metadata: name: {{ include "krakend.fullname" . }}-partials + namespace: {{ .Release.Namespace }} + labels: + {{- include "krakend.labels" . | nindent 4 }} {{- if .Values.krakend.partialsDirSource }} binaryData: {{- range $path, $_ := .Files.Glob .Values.krakend.partialsDirSource }} diff --git a/templates/cm-settings.yaml b/templates/cm-settings.yaml index 3e30cbb..d4351a6 100644 --- a/templates/cm-settings.yaml +++ b/templates/cm-settings.yaml @@ -3,6 +3,9 @@ kind: ConfigMap apiVersion: v1 metadata: name: {{ include "krakend.fullname" . }}-settings + namespace: {{ .Release.Namespace }} + labels: + {{- include "krakend.labels" . | nindent 4 }} {{- if .Values.krakend.settingsDirSource }} binaryData: {{- range $path, $_ := .Files.Glob .Values.krakend.settingsDirSource }} diff --git a/templates/cm-templates.yaml b/templates/cm-templates.yaml index cd69932..bff731e 100644 --- a/templates/cm-templates.yaml +++ b/templates/cm-templates.yaml @@ -3,6 +3,9 @@ kind: ConfigMap apiVersion: v1 metadata: name: {{ include "krakend.fullname" . }}-templates + namespace: {{ .Release.Namespace }} + labels: + {{- include "krakend.labels" . | nindent 4 }} {{- if .Values.krakend.templatesDirSource }} binaryData: {{- range $path, $_ := .Files.Glob .Values.krakend.templatesDirSource }} diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 9f85a8d..00b586d 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -7,6 +7,7 @@ kind: Rollout {{- end }} metadata: name: {{ include "krakend.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "krakend.labels" . | nindent 4 }} {{- with .Values.deploymentAnnotations }} @@ -87,11 +88,9 @@ spec: - name: http containerPort: {{ .Values.service.targetPort }} protocol: TCP - {{- if .Values.serviceMonitor.enabled }} - name: metrics containerPort: {{ .Values.serviceMonitor.targetPort }} protocol: TCP - {{- end }} {{- with .Values.livenessProbe }} livenessProbe: {{ toYaml . | nindent 12 }} {{- end }} diff --git a/templates/hpa.yaml b/templates/hpa.yaml index e6ea364..55d4821 100644 --- a/templates/hpa.yaml +++ b/templates/hpa.yaml @@ -3,6 +3,7 @@ apiVersion: {{ ternary "autoscaling/v2" "autoscaling/v2beta2" (.Capabilities.API kind: HorizontalPodAutoscaler metadata: name: {{ include "krakend.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "krakend.labels" . | nindent 4 }} {{- with .Values.autoscaling.annotations }} diff --git a/templates/ingress.yaml b/templates/ingress.yaml index e79ac6a..8d66b8f 100644 --- a/templates/ingress.yaml +++ b/templates/ingress.yaml @@ -16,6 +16,7 @@ apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} + namespace: {{ .Release.Namespace }} labels: {{- include "krakend.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} diff --git a/templates/service.yaml b/templates/service.yaml index e886d86..dcd766d 100644 --- a/templates/service.yaml +++ b/templates/service.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Service metadata: name: {{ include "krakend.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "krakend.labels" . | nindent 4 }} {{- if .Values.service.annotations }} diff --git a/templates/serviceaccount.yaml b/templates/serviceaccount.yaml index fb7e5df..cee29a6 100644 --- a/templates/serviceaccount.yaml +++ b/templates/serviceaccount.yaml @@ -3,6 +3,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "krakend.serviceAccountName" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "krakend.labels" . | nindent 4 }} {{- with .Values.serviceAccount.annotations }}