Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-cluster/templates/clusterrole.yaml
T
2026-08-26 03:39:42 +05:30

25 lines
796 B
YAML

{{- if and .Values.rbac.create (not .Values.rbac.namespaced) }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "victoria-metrics.fullname" . }}-clusterrole
labels:
{{- include "victoria-metrics.common.metaLabels" . | nindent 4 }}
{{- if .Values.rbac.extraLabels }}
{{ toYaml .Values.rbac.extraLabels | indent 4}}
{{- end }}
{{- with .Values.rbac.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
{{- if and .Values.rbac.pspEnabled (.Capabilities.APIVersions.Has "policy/v1beta1/PodSecurityPolicy") }}
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames: [{{ template "victoria-metrics.fullname" . }}]
{{- else }}
rules: []
{{- end }}
{{- end -}}