apiVersion: apps/v1
kind: Deployment
metadata:
  name: cozystack-controller
  namespace: cozy-system
  labels:
    app: cozystack-controller
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cozystack-controller
  template:
    metadata:
      labels:
        app: cozystack-controller
    spec:
      serviceAccountName: cozystack-controller
      containers:
      - name: cozystack-controller
        image: "{{ .Values.cozystackController.image }}"
        args:
        - --cozystack-version={{ .Values.cozystackController.cozystackVersion }}
        {{- if .Values.cozystackController.debug }}
        - --zap-log-level=debug
        {{- else }}
        - --zap-log-level=info
        {{- end }}
        {{- if .Values.cozystackController.disableTelemetry }}
        - --disable-telemetry
        {{- end }}
