flux-instance:
  instance:
    cluster:
      networkPolicy: true
      domain: cozy.local # -- default value is overriden in patches
    distribution:
      artifact: ""
      version: 2.6.x
      registry: ghcr.io/fluxcd
    components:
      - source-controller
      - kustomize-controller
      - helm-controller
      - notification-controller
      - image-reflector-controller
      - image-automation-controller
    kustomize:
      patches:
        - target:
            kind: Deployment
            name: "(kustomize-controller|helm-controller|source-controller)"
          patch: |
            - op: add
              path: /spec/template/spec/containers/0/args/-
              value: --concurrent=20
            - op: add
              path: /spec/template/spec/containers/0/args/-
              value: --requeue-dependency=5s
            - op: replace
              path: /spec/template/spec/containers/0/resources/limits
              value:
                cpu: 2000m
                memory: 2048Mi
        - target:
            kind: Deployment
            name: source-controller
          patch: |
            - op: add
              path: /spec/template/spec/containers/0/args/-
              value: --storage-adv-addr=source-controller.cozy-fluxcd.svc
            - op: add
              path: /spec/template/spec/containers/0/args/-
              value: --events-addr=http://notification-controller.cozy-fluxcd.svc/
        - target:
            kind: Deployment
            name: (kustomize-controller|helm-controller|image-reflector-controller|image-automation-controller)
          patch: |
            - op: add
              path: /spec/template/spec/containers/0/args/-
              value: --events-addr=http://notification-controller.cozy-fluxcd.svc/
