Skip to content

Commit

Permalink
fix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
pli01 committed Jun 8, 2024
1 parent 6d068b9 commit 0905ef4
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions charts/whoami/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand the namespace of the release.
Allows overriding it for multi-namespace deployments in combined charts.
*/}}
{{- define "whoami.namespace" -}}
{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- end }}

{{/*
Common labels
*/}}
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/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 "whoami.fullname" . }}
namespace: {{ include "whoami.namespace" . }}
labels:
{{- include "whoami.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "whoami.fullname" . }}
namespace: {{ include "whoami.namespace" . }}
labels:
{{- include "whoami.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/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: {{ include "whoami.namespace" . }}
labels:
{{- include "whoami.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "whoami.fullname" . }}
namespace: {{ include "whoami.namespace" . }}
labels:
{{- include "whoami.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/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 "whoami.serviceAccountName" . }}
namespace: {{ include "whoami.namespace" . }}
labels:
{{- include "whoami.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/whoami/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ image:

imagePullSecrets: []
nameOverride: ""
namespaceOverride: ""
fullnameOverride: ""

# containerArgs: []
Expand Down

0 comments on commit 0905ef4

Please sign in to comment.