apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
  name: rancher-backup
  namespace: flux-system
spec:
  interval: 10m
  targetNamespace: cattle-resources-system
  dependsOn:
    - name: rancher-backup-crd
  chart:
    spec:
      chart: rancher-backup
      version: "106.0.2+up8.1.0"
      sourceRef:
        kind: HelmRepository
        name: rancher-charts
        namespace: flux-system
  install:
    createNamespace: true
    remediation:
      retries: 3
  upgrade:
    remediation:
      retries: 3
  values:
    image:
      repository: rancher/backup-restore-operator
    kubectl:
      image:
        repository: rancher/kubectl
        tag: "v1.34.0"
  postRenderers:
    - kustomize:
        patches:
          - target:
              kind: Job
              name: rancher-backup-patch-sa
            patch: |
              - op: replace
                path: /spec/template/spec/containers/0/image
                value: rancher/kubectl:v1.34.0
