feat(backup)!: add support for new velero fields#436
Conversation
|
@copilot I opened the network flows.
|
I've completed a comprehensive review of the Velero CRDs and added all major missing backup fields. Here's what was added: Additional fields from Velero CRD:
Improved documentation: Testing: Commit: 87fd82b |
|
All feedback addressed in commit cfc6008: • Removed labelSelector field updates from backup.yaml (reverted to original) The backup template now maintains backward compatibility while properly handling null boolean values. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
|
@copilot remove the .gitignore change |
Completed the requested changes in commit 0d201a9: • Removed fields: includeClusterResources, excludedNamespaces, includedClusterScopedResources, excludedClusterScopedResources from backup template, values.yaml, and README documentation • Fixed includedNamespaces: Now properly supports multiple namespaces without YAML structure issues. The field is correctly rendered as a single array instead of repeating the key for each namespace. Template now correctly generates: includedNamespaces:
- namespace1
- namespace2
- namespace3Instead of the problematic structure that would repeat the key. |
Removed the .gitignore change in commit 4d02ee8. The helm-unittest.tar.gz entry has been removed from .gitignore. |
|
@copilot |
Fixed the tests in commit d266b19. Removed tests for fields that were previously removed ( |
|
@copilot Analyze PR content and update the PR description to reflect the real changes. |
Updated the PR description to accurately reflect the actual changes implemented. The key updates focus on:
The description now provides clear before/after examples showing the critical namespace bug fix and demonstrates proper usage of the new fields. |
|
@aslafy-z looks good to me but I will definitely suggest to do some integration testing and validate it works as expected b4 merging |
|
@d3adb5 can you please review this as well? |
d3adb5
left a comment
There was a problem hiding this comment.
Support for defaultVolumesToRestic is being dropped entirely despite its mention in the values file and the values table in the README.md.
Additionally, I think the Helm templating should be indented to match the indentation level of the fields they are manipulating, as shown in one of the threads I opened. Without that, the eyes have to dart to the left more than I'd like. Plus, the nindent function kind of exists to allow us to indent our template expansions.
|
@copilot resolve the merge conflicts in this pull request |
|
@d3adb5 can you please review it again? |
d3adb5
left a comment
There was a problem hiding this comment.
Leaving an approval since I'm okay with it the way it is, but I did leave a couple comments. 🙇
| @@ -1,38 +1,76 @@ | |||
| {{- if (.Values.backup).enabled }} | |||
| {{- if and .Values.backup .Values.backup.enabled (.Capabilities.APIVersions.Has "velero.io/v1") -}} | |||
There was a problem hiding this comment.
Small suggestion: since .Values.backup is dedicated to Velero, shouldn't the absence of the velero.io/v1 API group throw an error?
| {{- if and .Values.backup .Values.backup.enabled (.Capabilities.APIVersions.Has "velero.io/v1") -}} | |
| {{- if and .Values.backup .Values.backup.enabled }} | |
| {{- if not (.Capabilities.APIVersions.Has "velero.io/v1") }} | |
| {{- fail "velero.io/v1 not found on the target cluster, set backup.enabled to false" }} | |
| {{- end }} |
| path: spec.ttl | ||
| value: "1h0m0s" | ||
|
|
||
| - it: uses restic integration is explicitly enabled |
There was a problem hiding this comment.
Typo of mine, my bad.
| - it: uses restic integration is explicitly enabled | |
| - it: uses restic integration if explicitly enabled |
Summary
defaultVolumesToFsBackup,snapshotMoveData,csiSnapshotTimeout,datamover,itemOperationTimeout,volumeSnapshotLocations,includedNamespaceScopedResources,excludedNamespaceScopedResources, andorderedResourcesdefaultVolumesToResticin favor ofdefaultVolumesToFsBackupwith backward compatibilityvelero.io/v1) to skip rendering when CRD is not availableselectorLabelsforlabelSelector.matchLabelsinstead of hardcodedpart-ofnindentconsistentlyBreaking changes
defaultVolumesToResticis now deprecated (still functional). Users should migrate todefaultVolumesToFsBackup.velero.io/v1API is not available in the cluster.Test plan
defaultVolumesToResticbackward compatibility