Skip to content

Commit

Permalink
Adds namespace in each resource
Browse files Browse the repository at this point in the history
  • Loading branch information
MathildeLeroi committed Jul 8, 2022
1 parent 7eb54c5 commit 1ebb938
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions gitlab2rbac/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{{- $Values := .Values -}}
{{- range $type := .Values.ClusterRole.type }}
{{- $top := . -}}
{{- range $type := $top.Values.ClusterRole.type }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ $type.name }}
namespace: {{ $top.Release.Namespace }}
rules:
{{- toYaml $type.rules | nindent 0 }}

Expand Down
5 changes: 3 additions & 2 deletions gitlab2rbac/templates/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{{- $Values := .Values -}}
{{- range $type := .Values.ClusterRoleBinding.type }}
{{- $top := . -}}
{{- range $type := $top.Values.ClusterRoleBinding.type }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ $type.name }}
namespace: {{ $top.Release.Namespace }}
roleRef:
apiGroup: {{ $type.roleRefapiGroup | default "rbac.authorization.k8s.io"}}
kind: {{ $type.roleRefkind | default "ClusterRole" }}
Expand Down
1 change: 1 addition & 0 deletions gitlab2rbac/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 "gitlab2rbac.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gitlab2rbac.labels" . | nindent 4 }}
data:
Expand Down
1 change: 1 addition & 0 deletions gitlab2rbac/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 "gitlab2rbac.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gitlab2rbac.labels" . | nindent 4 }}
spec:
Expand Down
1 change: 1 addition & 0 deletions gitlab2rbac/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 "gitlab2rbac.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "gitlab2rbac.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
Expand Down

0 comments on commit 1ebb938

Please sign in to comment.