apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
  name: seerr-seerr-chart-config-backup-secret-local
  namespace: seerr
  labels:
    helm.sh/chart: volsync-target-config-2.0.0
    app.kubernetes.io/instance: seerr
    app.kubernetes.io/part-of: seerr
    app.kubernetes.io/version: "2.0.0"
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: seerr-seerr-chart-config-backup-secret-local
spec:
  secretStoreRef:
    kind: ClusterSecretStore
    name: openbao
  target:
    template:
      mergePolicy: Merge
      engineVersion: v2
      data:
        RESTIC_REPOSITORY: "s3:{{ .ENDPOINT }}/{{ .BUCKET }}/cl01tl/seerr/seerr-seerr-chart-config"
  data:
    - secretKey: ENDPOINT
      remoteRef:
        key: /garage/config
        property: ENDPOINT_LOCAL
    - secretKey: BUCKET
      remoteRef:
        key: /garage/home-infra/volsync-backups
        property: BUCKET
    - secretKey: RESTIC_PASSWORD
      remoteRef:
        key: /garage/home-infra/volsync-backups
        property: RESTIC_PASSWORD_LOCAL
    - secretKey: AWS_DEFAULT_REGION
      remoteRef:
        key: /garage/home-infra/volsync-backups
        property: ACCESS_REGION
    - secretKey: AWS_ACCESS_KEY_ID
      remoteRef:
        key: /garage/home-infra/volsync-backups
        property: ACCESS_KEY_ID
    - secretKey: AWS_SECRET_ACCESS_KEY
      remoteRef:
        key: /garage/home-infra/volsync-backups
        property: ACCESS_SECRET_KEY
