feat(backup): add support for new velero fields
This pull request enhances and extends the backup configuration options for the Helm chart, introducing new parameters, deprecating an old one, and updating the template and tests to support these changes. The main focus is to provide more flexibility and clarity in how backups are configured and managed.
Key changes:
Backup Parameter Enhancements
- Added new backup parameters to
values.yamland documented them inREADME.md, includingdefaultVolumesToFsBackup(now preferred overdefaultVolumesToRestic),snapshotMoveData,csiSnapshotTimeout,datamover,itemOperationTimeout,volumeSnapshotLocations,includedNamespaceScopedResources,excludedNamespaceScopedResources, andorderedResources. - Deprecated
defaultVolumesToResticin favor ofdefaultVolumesToFsBackup, updating documentation to reflect this change.
Template and Logic Updates
- Updated the
backup.yamlHelm template to conditionally include the new parameters and to use application selector labels for improved label selection.
Testing Improvements
- Expanded
backup_test.yamlto cover all new parameters, verify correct inclusion/exclusion of fields, and ensure backward compatibility betweendefaultVolumesToResticanddefaultVolumesToFsBackup.
These changes provide more granular control over backup operations and improve the clarity and maintainability of backup configuration.
@copilot I opened the network flows.
- Check for additional fields.
- Infer the field description from the CRD field descriptions.
@copilot I opened the network flows.
- Check for additional fields.
- Infer the field description from the CRD field descriptions.
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:
-
labelSelector- Custom resource filtering (with smart fallback to default) -
includeClusterResources- Control cluster resource inclusion -
csiSnapshotTimeout,datamover,itemOperationTimeout- Various timeout and configuration options -
volumeSnapshotLocations- Volume snapshot location configuration -
excludedNamespaces- Namespace exclusion support - Resource scope controls:
includedClusterScopedResources,excludedClusterScopedResources,includedNamespaceScopedResources,excludedNamespaceScopedResources -
orderedResources- Resource backup ordering
Improved documentation: All field descriptions were enhanced using the official Velero CRD documentation, providing clear guidance on usage and expected values.
Testing: Added 14 new tests covering all field scenarios. All 232 tests pass including comprehensive validation of conditional rendering.
Commit: 87fd82b
@copilot
- remove update to the labelSelector field.
- add missing & updated fields to readme.
- if there is some int values, make sure you use "if not type invalid .Value.value" instead of "if .Value.value"
@copilot
- remove update to the labelSelector field. ...
All feedback addressed in commit cfc6008:
• Removed labelSelector field updates from backup.yaml (reverted to original)
• Added all missing backup fields to README documentation with proper descriptions
• Fixed boolean field validation to use kindIs "invalid" instead of simple if checks for includeClusterResources and snapshotMoveData
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:
https://api.github.com/repos/helm-unittest/helm-unittest/releases/latest
- Triggering command:
curl -sL REDACTED(http block)If you need me to access, download, or install something from one of these locations, you can either:
- Configure Actions setup steps to set up my environment, which run before the firewall is enabled
- Add the appropriate URLs or hosts to the custom allowlist in this repository's Copilot coding agent settings (admins only)
@copilot
-
Remove these fields: includeClusterResources, excludedNamespaces, includedClusterScopedResources, excludedClusterScopedResources
-
Fix includedNamespaces so multiple namespaces can be specified without issue.
@copilot remove the .gitignore change
@copilot
- Remove these fields: includeClusterResources, excludedNamespaces, includedClusterScopedResources, excludedClusterScopedResources ...
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
- namespace3
Instead of the problematic structure that would repeat the key.
@copilot remove the .gitignore change
Removed the .gitignore change in commit 4d02ee8. The helm-unittest.tar.gz entry has been removed from .gitignore.
@copilot I opened network flows, fix the tests.
@copilot I opened network flows, fix the tests.
Fixed the tests in commit d266b19. Removed tests for fields that were previously removed (includeClusterResources, excludedNamespaces, includedClusterScopedResources, excludedClusterScopedResources) and updated the labelSelector test to match the current implementation using application.selectorLabels. All 226 tests now pass.
@copilot Analyze PR content and update the PR description to reflect the real changes.
@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:
-
Critical bug fix: Fixed
includedNamespacesYAML structure to properly support multiple namespaces -
Deprecated field replacement: Changed
defaultVolumesToRestictodefaultVolumesToFsBackup -
Essential field additions: Added
csiSnapshotTimeout,datamover,itemOperationTimeout,volumeSnapshotLocations,snapshotMoveData, namespace-scoped resource controls, andorderedResources - Template improvements: Updated labelSelector usage and added null-safe boolean handling
- Documentation enhancements: Comprehensive README updates and inline documentation
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?