RBAC: Update serviceaccount and k8s rbac for Airflow

This patch set brings the airflow/shipyard chart to be
inline with OSH* RBAC approach used in [0] and [1]

[0] https://review.openstack.org/#/c/526464/52
[1] https://review.openstack.org/#/c/529378/

Change-Id: Id2ff9f59028474601933196e1722b46c95f3a8ac
This commit is contained in:
Anthony Lin
2018-01-22 16:47:00 +00:00
parent ac637d6614
commit b379477236
6 changed files with 18 additions and 0 deletions

View File

@@ -17,6 +17,8 @@ limitations under the License.
{{- if .Values.manifests.job_airflow_db_sync }}
{{- $envAll := . }}
{{- $dependencies := .Values.dependencies.airflow_db_sync }}
{{- $serviceAccountName := "airflow-db-sync" }}
{{ tuple $envAll $dependencies $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }}
---
apiVersion: batch/v1
kind: Job
@@ -28,6 +30,7 @@ spec:
labels:
{{ tuple $envAll "airflow" "db-sync" | include "helm-toolkit.snippets.kubernetes_metadata_labels" | indent 8 }}
spec:
serviceAccountName: {{ $serviceAccountName }}
restartPolicy: OnFailure
nodeSelector:
{{ .Values.labels.node_selector_key }}: {{ .Values.labels.node_selector_value }}