Skip to content

Commit

Permalink
Added RBAC for Octane
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Mar 23, 2022
1 parent bacbe9b commit 6484fc8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/laravel-octane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.5.0
version: 0.6.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/laravel-octane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Install Laravel Octane chart:
```bash
$ helm upgrade laravel-octane-app \
--install \
--version=0.5.0 \
--version=0.6.0 \
renoki-co/laravel-octane
```

Expand Down
10 changes: 10 additions & 0 deletions charts/laravel-octane/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ include "laravel-octane.fullname" . }}
labels:
{{- include "laravel-octane.labels" . | nindent 4 }}
rules:
{{- toYaml .Values.rbac.rules | nindent 2 }}
{{- end }}
16 changes: 16 additions & 0 deletions charts/laravel-octane/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ include "laravel-octane.fullname" . }}
labels:
{{- include "laravel-octane.labels" . | nindent 4 }}
{{- end }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "laravel-octane.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "laravel-octane.serviceAccountName" . }}
{{- end }}
11 changes: 11 additions & 0 deletions charts/laravel-octane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

rbac:
create: false
rules: []
# - apiGroups:
# - ""
# resources:
# - pods
# verbs:
# - get
# - list

podAnnotations: {}

podSecurityContext: {}
Expand Down

0 comments on commit 6484fc8

Please sign in to comment.