Skip to content

Commit

Permalink
feat: explicitly set namespace in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
asemarian committed Sep 23, 2024
1 parent 05510e5 commit 1028083
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/flipt/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-1"
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/configmap_ssh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "flipt.fullname" . }}-ssh-known-hosts
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: {{ include "flipt.apiVersion.autoscaling" . }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/migration_job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: batch/v1
kind: Job
metadata:
name: {{ include "flipt.migration_name" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
annotations:
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: {{ template "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
labels: {{- include "flipt.labels" . | nindent 4 }}
spec:
maxUnavailable: {{ default "25%" .Values.pdb.maxUnavailable }}
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: {{ include "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
{{- if or .Values.persistence.annotations .Values.commonAnnotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "flipt.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
Expand Down
1 change: 1 addition & 0 deletions charts/flipt/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "flipt.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
2 changes: 1 addition & 1 deletion charts/flipt/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: ServiceMonitor
metadata:
name: {{ template "flipt.fullname" . }}
{{- with .Values.metrics.serviceMonitor.namespace }}
namespace: {{ . }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "flipt.labels" . | nindent 4 }}
Expand Down

0 comments on commit 1028083

Please sign in to comment.