Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helm chart: explicitly include namespace in created resources #9711

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions helm/nessie/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "nessie.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- if .Values.configMapLabels }}
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "nessie.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- if .Values.podLabels }}
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "nessie.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
3 changes: 3 additions & 0 deletions helm/nessie/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "nessie.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
Expand All @@ -43,6 +44,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "nessie.fullname" . }}-mgmt
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- with .Values.managementService.annotations }}
Expand Down Expand Up @@ -70,6 +72,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "nessie.fullname" $ }}{{ $svc.nameSuffix }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "nessie.labels" $ | nindent 4 }}
{{- with $svc.annotations }}
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "nessie.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
3 changes: 2 additions & 1 deletion helm/nessie/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ template "nessie.fullname" . }}
name: {{ include "nessie.fullname" . }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intentional change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, to align with other occurrences of this template inclusion. (In this context, using template or include yields the same result.)

namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
{{- if .Values.serviceMonitor.labels }}
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "nessie.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions helm/nessie/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "nessie.fullname" . }}-test-connection"
namespace: {{ .Release.Namespace }}
labels:
{{- include "nessie.labels" . | nindent 4 }}
annotations:
Expand Down