mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 20:12:43 +00:00
NO MORE GIT SUBMODULE
This commit is contained in:
35
consul-helm/templates/tls-init-cleanup-clusterrole.yaml
Normal file
35
consul-helm/templates/tls-init-cleanup-clusterrole.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
{{- if (or (and (ne (.Values.server.enabled | toString) "-") .Values.server.enabled) (and (eq (.Values.server.enabled | toString) "-") .Values.global.enabled)) }}
|
||||
{{- if .Values.global.tls.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "consul.fullname" . }}-tls-init-cleanup
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: {{ template "consul.name" . }}
|
||||
chart: {{ template "consul.chart" . }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources:
|
||||
- secrets
|
||||
resourceNames:
|
||||
{{- if (not (and .Values.global.tls.caCert.secretName .Values.global.tls.caKey.secretName)) }}
|
||||
- {{ template "consul.fullname" . }}-ca-cert
|
||||
- {{ template "consul.fullname" . }}-ca-key
|
||||
{{- end }}
|
||||
- {{ template "consul.fullname" . }}-server-cert
|
||||
verbs:
|
||||
- delete
|
||||
{{- if .Values.global.enablePodSecurityPolicies }}
|
||||
- apiGroups: ["policy"]
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
verbs:
|
||||
- use
|
||||
resourceNames:
|
||||
- {{ template "consul.fullname" . }}-tls-init-cleanup
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Reference in New Issue
Block a user