Skip to content

Commit

Permalink
Merge pull request #139 from titigmr/feat/ocp-library
Browse files Browse the repository at this point in the history
feat: ✨ ocp compatibility library chart
  • Loading branch information
fcomte authored May 30, 2024
2 parents 9a2efec + c5850f8 commit 8e2b5e5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/library-chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v2
name: library-chart
version: 1.5.21
version: 1.5.22
type: library
23 changes: 23 additions & 0 deletions charts/library-chart/templates/_role_binding.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,26 @@ subjects:
{{- end }}
{{- end }}
{{- end }}


{{/* Template to generate a RoleBinding to SCC */}}
{{- define "library-chart.roleBindingSCC" -}}
{{- if .Values.serviceAccount.create -}}
{{- if .Values.openshiftSCC.enabled -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: '{{ include "library-chart.serviceAccountName" . }}-scc-{{ .Values.openshiftSCC.scc }}'
labels:
{{- include "library-chart.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:openshift:scc:{{ .Values.openshiftSCC.scc }}
subjects:
- kind: ServiceAccount
name: {{ include "library-chart.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit 8e2b5e5

Please sign in to comment.