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

Commit

Permalink
fix pb when use securityContext and add opportunity to add storagecla…
Browse files Browse the repository at this point in the history
…ss (#2818)

* fix pb when use securityContext and add opportunity to add storageclass

* add readme comment and fixup

* fixup

* fixup

* fixup
  • Loading branch information
obeyler authored Jun 10, 2020
1 parent 268fb9a commit 5068f67
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ chart and their default values.
| `controllerManager.service.clusterIP` | If service type is ClusterIP, specify clusterIP as `None` for `headless services` OR specify your own specific IP OR leave blank to let Kubernetes assign a cluster IP | |
| `rbacEnable` | If true, create & use RBAC resources | `true` |
| `originatingIdentityEnabled` | Whether the OriginatingIdentity feature should be enabled | `true` |
| `persistence.storageClass` | Define the storageclass use by pvc | `null` |
| `asyncBindingOperationsEnabled` | Whether or not alpha support for async binding operations is enabled | `false` |
| `namespacedServiceBrokerDisabled` | Whether or not alpha support for namespace scoped brokers is disabled | `false` |

Expand Down
4 changes: 4 additions & 0 deletions charts/catalog/templates/cleaner-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ spec:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
restartPolicy: Never
serviceAccountName: clean-job-account
imagePullSecrets:
Expand Down
6 changes: 6 additions & 0 deletions charts/catalog/templates/controller-manager-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec:
serviceAccountName: "{{ .Values.controllerManager.serviceAccount }}"
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
volumes:
- name: run
emptyDir: {}
containers:
- name: controller-manager
image: {{ .Values.image }}
Expand Down Expand Up @@ -99,6 +102,9 @@ spec:
- --feature-gates
- CascadingDeletion=true
{{- end }}
volumeMounts:
- mountPath: /var/run
name: run
ports:
- containerPort: 8444
{{- if .Values.controllerManager.healthcheck.enabled }}
Expand Down
4 changes: 4 additions & 0 deletions charts/catalog/templates/migration-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ spec:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
restartPolicy: Never
serviceAccountName: migration-job-account
imagePullSecrets:
Expand Down
11 changes: 11 additions & 0 deletions charts/catalog/templates/pre-migration-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ spec:
resources:
requests:
storage: 200Mi
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}

---
apiVersion: batch/v1
Expand Down Expand Up @@ -119,6 +126,10 @@ spec:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
restartPolicy: Never
serviceAccountName: pre-migration-job-account
imagePullSecrets:
Expand Down
4 changes: 4 additions & 0 deletions charts/catalog/templates/webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
{{ toYaml .Values.webhook.annotations | indent 8 }}
{{- end }}
spec:
{{- with .Values.securityContext }}
securityContext:
{{ toYaml . | indent 8 }}
{{- end }}
serviceAccountName: "{{ .Values.webhook.serviceAccount }}"
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
Expand Down
9 changes: 9 additions & 0 deletions charts/catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,12 @@ cascadingDeletionEnabled: false
## by example :
## securityContext: { runAsUser: 1001 }
securityContext: {}
persistence:
## database data Persistent Volume Storage Class
## If defined, storageClassName: <storageClass>
## If set to "-", storageClassName: "", which disables dynamic provisioning
## If undefined (the default) or set to null, no storageClassName spec is
## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
storageClass:

0 comments on commit 5068f67

Please sign in to comment.