# Default values for Velero
image:
  repository: velero/velero
  tag: v1.12.0
  pullPolicy: IfNotPresent

# Specify an imagePullSecret if using a private registry
imagePullSecrets: []

# Deployment specs
resources:
  requests:
    cpu: 500m
    memory: 256Mi
  limits:
    cpu: 1000m
    memory: 512Mi

# Plugin providers - using AWS plugin for S3-compatible storage
plugins:
  - aws
  - openshift

# Backup destination storage - Storj configuration
backupStorage:
  provider: aws
  bucket: containermom-backup
  region: global
  config:
    s3Url: "https://gateway.storjshare.io"
    s3ForcePathStyle: "true"
    insecureSkipTLSVerify: "false"
    # Storj requires valid public and private keys
    # These will be set via environment variables
    storjAccessGrant: ""
    storjEndpoint: "gateway.storjshare.io"

# Schedule settings for different backup types
schedules:
  # ContainerMom CRs - the "database" of the service
  containerMomCRs:
    schedule: "0 1 * * *"  # Daily at 1 AM
    template:
      ttl: "720h" # 30 days retention
      includedNamespaces:
        - containermom-system
      includedResources:
        - customers.container.mom
        - containermomdeployments.container.mom
        - templates.container.mom
        - builders.container.mom
      excludedResources: []

  # Forgejo instance - Git repositories and configuration
  forgejo:
    schedule: "0 2 * * *"  # Daily at 2 AM
    template:
      ttl: "720h" # 30 days retention
      includedNamespaces:
        - forgejo-system
      includedResources:
        - persistentvolumeclaims
        - pods
        - deployments
        - statefulsets
        - secrets
        - configmaps
      excludedResources: []

  # Customer stateful workloads - automatically detect workloads with PVCs
  customerWorkloads:
    schedule: "0 3 * * *"  # Daily at 3 AM
    template:
      ttl: "168h" # 7 days retention
      includedNamespaces:
        - containermom-workloads
      includedResources:
        - persistentvolumeclaims
        - persistentvolumes
        - pods
        - statefulsets
        - deployments
        - secrets
        - configmaps
      # No labelSelector - will automatically include all workloads with PVCs
      snapshotVolumes: true

  # High priority backup for critical customer workloads
  # Only backup workloads with the containermom.io/backup-priority=high annotation
  highPriorityBackup:
    schedule: "0 */6 * * *"  # Every 6 hours
    template:
      ttl: "168h" # 7 days retention
      includedNamespaces:
        - containermom-workloads
      includedResources:
        - persistentvolumeclaims
        - persistentvolumes
        - pods
        - statefulsets
        - deployments
        - secrets
        - configmaps
      labelSelector:
        matchExpressions:
          - key: containermom.io/backup-priority
            operator: In
            values: ["high"]
      snapshotVolumes: true

# Security settings
serviceAccount:
  create: true
  name: velero
  annotations: {}

rbac:
  create: true

securityContext:
  fsGroup: 65534
  runAsUser: 65534
  runAsGroup: 65534

# Additional labels and annotations
labels: {}
annotations: {}

# Allow Velero to restic pod volumes
restic:
  enabled: true
  resources:
    requests:
      cpu: 250m
      memory: 128Mi
    limits:
      cpu: 500m
      memory: 256Mi
