
Adds the leader-elector container support that was removed in PR #568. The new vault-k8s uses an internal mechanism for leader determination, so this is just for backwards compatibility, and can be removed in the near future. * mark the endpoint as deprecated * add a new useContainer option for leaderElector Default to not deploying the old leader-elector container, unless injector.leaderElector.useContainer is `true`.
25 lines
832 B
YAML
25 lines
832 B
YAML
{{- if and (eq (.Values.injector.enabled | toString) "true" ) (eq (.Values.global.enabled | toString) "true") (eq (.Values.injector.leaderElector.enabled | toString) "true") (gt (.Values.injector.replicas | int) 1) }}
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
kind: Role
|
|
metadata:
|
|
name: {{ template "vault.fullname" . }}-agent-injector-leader-elector-role
|
|
labels:
|
|
app.kubernetes.io/name: {{ include "vault.name" . }}-agent-injector
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["secrets", "configmaps", "endpoints"]
|
|
verbs:
|
|
- "create"
|
|
- "get"
|
|
- "watch"
|
|
- "list"
|
|
- "update"
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs:
|
|
- "get"
|
|
- "patch"
|
|
- "delete"
|
|
{{- end }}
|