vmware-tanzu / helm-charts

Contains Helm charts for Kubernetes related open source tools
https://vmware-tanzu.github.io/helm-charts/
Apache License 2.0
254 stars 363 forks source link

Apply the resource policy configmap to a yaml with CRD Backup ou Schedule #542

Closed andreyolv closed 10 months ago

andreyolv commented 10 months ago

Describe the problem/challenge you have Documentation only show how to apply resource policy configmap using velero cli.

How can I apply the resource policy configmap to a yaml with CRD Backup ou Schedule? It's possible?

Is there any example?

Environment:

andreyolv commented 10 months ago

I found the answer =D

apiVersion: velero.io/v1
kind: Schedule
metadata:
  name: cluster-dev
  namespace: velero
spec:
  schedule: "0 0 * * *"
  template:
    resourcePolicy:
      kind: configmap
      name: velero-policy
    includedNamespaces:
    - '*'
    includedResources:
    - '*'
    ...