apiVersion: v1
kind: ConfigMap
metadata:
  name: lifecycle-manager-config
  namespace: {{ .Release.Namespace | quote }}
  {{- $annotations := include "common.annotations" (dict "context" .) }}
  {{- with $annotations }}
  annotations: {{- . -}}
  {{- end }}
  labels:
{{- include "common.labels.standard" ( dict "context" . ) | nindent 4 }}
data:
  controller_manager_config.yaml: |
    apiVersion: controller-runtime.sigs.k8s.io/v1alpha1
    health:
      healthProbeBindAddress: {{ .Values.config.health.healthProbeBindAddress
        | quote }}
    kind: ControllerManagerConfig
    leaderElection:
      leaderElect: {{ .Values.config.leaderElection.leaderElect
        }}
      resourceName: {{ .Values.config.leaderElection.resourceName
        | quote }}
    metrics:
      bindAddress: {{ .Values.config.metrics.bindAddress
        | quote }}
    webhook:
      port: {{ .Values.config.webhook.port
        }}