Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Add support for using a custom namespace in helm chart #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions charts/easyauth-proxy/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ Create the name of the service account to use
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{- define "easyauth-proxy.namespace" -}}
{{ .Values.namespace | default .Release.Namespace }}
{{- end -}}
1 change: 1 addition & 0 deletions charts/easyauth-proxy/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "easyauth-proxy.fullname" . }}
namespace: {{ include "easyauth-proxy.namespace" . }}
labels:
{{- include "easyauth-proxy.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/easyauth-proxy/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "easyauth-proxy.fullname" . }}-ingress
namespace: {{ include "easyauth-proxy.namespace" . }}
labels:
{{- include "easyauth-proxy.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/easyauth-proxy/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ .Values.claimName }}
namespace: {{ include "easyauth-proxy.namespace" . }}
spec:
accessModes:
- ReadWriteMany
Expand Down
2 changes: 1 addition & 1 deletion charts/easyauth-proxy/templates/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Secret
metadata:
name: {{ .Values.secret.name}}
namespace: default
namespace: {{ include "easyauth-proxy.namespace" . }}
type: Opaque
data:
CLIENT_SECRET: {{ .Values.secret.azureclientsecret | b64enc }}
1 change: 1 addition & 0 deletions charts/easyauth-proxy/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 "easyauth-proxy.fullname" . }}
namespace: {{ include "easyauth-proxy.namespace" . }}
labels:
{{- include "easyauth-proxy.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions charts/easyauth-proxy/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 "easyauth-proxy.serviceAccountName" . }}
namespace: {{ include "easyauth-proxy.namespace" . }}
labels:
{{- include "easyauth-proxy.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down
1 change: 1 addition & 0 deletions charts/easyauth-proxy/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "easyauth-proxy.fullname" . }}
namespace: {{ include "easyauth-proxy.namespace" . }}
labels:
{{- include "easyauth-proxy.labels" . | nindent 4 }}
spec:
Expand Down
2 changes: 2 additions & 0 deletions charts/easyauth-proxy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

namespace: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down