Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add velero namespace to the exclusion list of backup tasks #8716

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hu-keyu
Copy link

@hu-keyu hu-keyu commented Feb 21, 2025

  1. Add Velero namespace to the exclusion list of backup tasks by default.
  2. After self-protection feature, we will change it.

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #(issue)

Please indicate you've done the following:

…ult;

2. After self-protection feature, we will change it.
@hu-keyu hu-keyu changed the title 1. Add Velero namespace to the exclusion list of backup tasks by defa… Add Velero namespace to the exclusion list of backup tasks Feb 21, 2025
@hu-keyu hu-keyu changed the title Add Velero namespace to the exclusion list of backup tasks Add velero namespace to the exclusion list of backup tasks Feb 21, 2025
if err := b.kbClient.Get(context.Background(), kbclient.ObjectKey{Name: backup.GetNamespace()}, &backupNamespace); err != nil {
request.Status.ValidationErrors = append(request.Status.ValidationErrors, fmt.Sprintf("error getting backup namespace: %v", err))
} else {
request.Spec.ExcludedNamespaces = append(request.Spec.ExcludedNamespaces, backupNamespace.Name)
Copy link
Contributor

@Lyndon-Li Lyndon-Li Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot simply exclude Velero namespace from backup, some resources are created into Velero namespace dynamically and still need to be backed up, i.e., dataupload, podvolumebackup, volumesnapshot, etc. This mechanism will be used widerly and is implemented as part of internal logics, instead of directly requested by users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants