Skip to content

Commit a0bec6f

Browse files
authored
helmchart: add namespace override (#34)
Signed-off-by: Filip Rafaj <filip.rafaj@prusa3d.cz>
1 parent 7b9b3a3 commit a0bec6f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

helm/argocd-rbac-operator/templates/_helpers.tpl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,13 @@ app.kubernetes.io/instance: {{ .Release.Name }}
3939
Create the name of the namespace
4040
*/}}
4141
{{- define "argocd-rbac-operator.namespace" -}}
42+
{{- if .Values.namespace.nameOverride }}
43+
{{- .Values.namespace.nameOverride | trimSuffix "-" }}
44+
{{- else }}
4245
{{- printf "%s-system" .Chart.Name | trimSuffix "-" }}
4346
{{- end }}
47+
{{- end }}
48+
4449

4550
{{/*
4651
Create the name of the service account

helm/argocd-rbac-operator/templates/namespace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if .Values.createNamespace -}}
1+
{{- if .Values.namespace.create -}}
22
apiVersion: v1
33
kind: Namespace
44
metadata:

helm/argocd-rbac-operator/values.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
66
replicaCount: 1
77

8-
createNamespace: true
8+
namespace:
9+
nameOverride: ""
10+
create: true
911

1012
argocd:
1113
# The namespace where the ArgoCD instance is running
@@ -44,7 +46,7 @@ containerSecurityContext:
4446
allowPrivilegeEscalation: false
4547
capabilities:
4648
drop:
47-
- ALL
49+
- ALL
4850
readOnlyRootFilesystem: true
4951
runAsNonRoot: true
5052
seccompProfile:
@@ -72,4 +74,4 @@ readinessProbe:
7274
initialDelaySeconds: 5
7375
periodSeconds: 10
7476

75-
nodeSelector: {}
77+
nodeSelector: {}

0 commit comments

Comments
 (0)