rancher-partner-charts/charts/hashicorp/consul/templates/create-federation-secret-ro...

24 lines
808 B
YAML

{{- if .Values.global.federation.createFederationSecret }}
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ template "consul.fullname" . }}-create-federation-secret
namespace: {{ .Release.Namespace }}
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: create-federation-secret
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": hook-succeeded,before-hook-creation
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ template "consul.fullname" . }}-create-federation-secret
subjects:
- kind: ServiceAccount
name: {{ template "consul.fullname" . }}-create-federation-secret
{{- end }}