apiVersion: capsule.clastix.io/v1alpha1
kind: CapsuleConfiguration
metadata:
  name: default
  labels:
  {{- include "capsule.labels" . | nindent 4 }}
  annotations:
    capsule.clastix.io/mutating-webhook-configuration-name: {{ include "capsule.fullname" . }}-mutating-webhook-configuration
    capsule.clastix.io/tls-secret-name: {{ include "capsule.secretTlsName" . }}
    capsule.clastix.io/validating-webhook-configuration-name: {{ include "capsule.fullname" . }}-validating-webhook-configuration
    capsule.clastix.io/enable-tls-configuration: "{{ .Values.tls.enableController }}"
  {{- with .Values.customAnnotations }}
    {{- toYaml . | nindent 4 }}
  {{- end }}
spec:
  forceTenantPrefix: {{ .Values.manager.options.forceTenantPrefix }}
  userGroups:
{{- range .Values.manager.options.capsuleUserGroups }}
    - {{ . }}
{{- end}}
  protectedNamespaceRegex: {{ .Values.manager.options.protectedNamespaceRegex | quote }}
