github.com/replicatedcom/ship@v0.50.0/integration/init/istio-1.0.3/expected/.ship/upstream/charts/grafana/templates/create-custom-resources-job.yaml (about) 1 apiVersion: v1 2 kind: ServiceAccount 3 metadata: 4 name: istio-grafana-post-install-account 5 namespace: {{ .Release.Namespace }} 6 labels: 7 app: istio-grafana 8 chart: {{ .Chart.Name }}-{{ .Chart.Version }} 9 heritage: {{ .Release.Service }} 10 release: {{ .Release.Name }} 11 --- 12 apiVersion: rbac.authorization.k8s.io/v1beta1 13 kind: ClusterRole 14 metadata: 15 name: istio-grafana-post-install-{{ .Release.Namespace }} 16 labels: 17 app: istio-grafana 18 chart: {{ .Chart.Name }}-{{ .Chart.Version }} 19 heritage: {{ .Release.Service }} 20 release: {{ .Release.Name }} 21 rules: 22 - apiGroups: ["authentication.istio.io"] # needed to create default authn policy 23 resources: ["*"] 24 verbs: ["*"] 25 --- 26 apiVersion: rbac.authorization.k8s.io/v1beta1 27 kind: ClusterRoleBinding 28 metadata: 29 name: istio-grafana-post-install-role-binding-{{ .Release.Namespace }} 30 labels: 31 app: istio-grafana 32 chart: {{ .Chart.Name }}-{{ .Chart.Version }} 33 heritage: {{ .Release.Service }} 34 release: {{ .Release.Name }} 35 roleRef: 36 apiGroup: rbac.authorization.k8s.io 37 kind: ClusterRole 38 name: istio-grafana-post-install-{{ .Release.Namespace }} 39 subjects: 40 - kind: ServiceAccount 41 name: istio-grafana-post-install-account 42 namespace: {{ .Release.Namespace }} 43 --- 44 apiVersion: batch/v1 45 kind: Job 46 metadata: 47 name: istio-grafana-post-install 48 namespace: {{ .Release.Namespace }} 49 annotations: 50 "helm.sh/hook": post-install 51 "helm.sh/hook-delete-policy": hook-succeeded 52 labels: 53 app: istio-grafana 54 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} 55 release: {{ .Release.Name }} 56 heritage: {{ .Release.Service }} 57 spec: 58 template: 59 metadata: 60 name: istio-grafana-post-install 61 labels: 62 app: istio-grafana 63 release: {{ .Release.Name }} 64 spec: 65 serviceAccountName: istio-grafana-post-install-account 66 containers: 67 - name: hyperkube 68 image: "{{ .Values.global.hyperkube.hub }}/hyperkube:{{ .Values.global.hyperkube.tag }}" 69 command: [ "/bin/bash", "/tmp/grafana/run.sh", "/tmp/grafana/custom-resources.yaml" ] 70 volumeMounts: 71 - mountPath: "/tmp/grafana" 72 name: tmp-configmap-grafana 73 volumes: 74 - name: tmp-configmap-grafana 75 configMap: 76 name: istio-grafana-custom-resources 77 restartPolicy: OnFailure