Skip to content
This repository has been archived by the owner on May 18, 2020. It is now read-only.

Commit

Permalink
add sck8s option e.g. for ttc (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandawsonuk authored Jan 9, 2019
1 parent 7304e9b commit 1fd3e9c
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 1 deletion.
12 changes: 12 additions & 0 deletions charts/example-runtime-bundle/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#configmap if using sck8s as not mounted (see also extraEnv)
{{- if .Values.configMap }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.service.name }}
data:
application.properties: |-
{{- range $key, $value := .Values.configMap }}
{{ $key }}={{ $value }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/example-runtime-bundle/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ spec:
resources:
{{ toYaml .Values.resources | indent 12 }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.serviceAccount.create }}
serviceAccountName: {{ .Values.service.name }}
{{- end }}
55 changes: 55 additions & 0 deletions charts/example-runtime-bundle/templates/role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Chart.Name }}
rules:
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- watch
- patch
- create
- update
- delete
- apiGroups:
- ""
resources:
- configmaps
- services
- endpoints
- pods
- configmaps
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- apps
resources:
- deployments
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- ""
resources:
- routes
verbs:
- get
- list
- watch
- patch
- create
- update
- delete
{{- end -}}
15 changes: 15 additions & 0 deletions charts/example-runtime-bundle/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Chart.Name }}
subjects:
- kind: ServiceAccount
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
{{- end -}}
11 changes: 11 additions & 0 deletions charts/example-runtime-bundle/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
app: {{ .Chart.Name }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
name: {{ .Chart.Name }}
{{- end -}}
8 changes: 7 additions & 1 deletion charts/example-runtime-bundle/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,10 @@ readinessProbe:
terminationGracePeriodSeconds: 20
ingress:
## Set to true to enable ingress record generation
enabled: false
enabled: false

#only needed when using sck8s
rbac:
create: true
serviceAccount:
create: true

0 comments on commit 1fd3e9c

Please sign in to comment.