velero/pkg/cmd/cli
Tiger Kaovilai 35d2cc0890
Add priority class support for Velero server and node-agent
- Add --server-priority-class-name and --node-agent-priority-class-name flags to velero install command
- Configure data mover pods (PVB/PVR/DataUpload/DataDownload) to use priority class from node-agent-configmap
- Configure maintenance jobs to use priority class from repo-maintenance-job-configmap (global config only)
- Add priority class validation with ValidatePriorityClass and GetDataMoverPriorityClassName utilities
- Update e2e tests to include PriorityClass testing utilities
- Move priority class design document to Implemented folder
- Add comprehensive unit tests for all priority class implementations
- Update documentation for priority class configuration
- Add changelog entry for #8883

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

remove unused test utils

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

feat: add unit test for getting priority class name in maintenance jobs

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

doc update

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

feat: add priority class validation for repository maintenance jobs

- Add ValidatePriorityClassWithClient function to validate priority class existence
- Integrate validation in maintenance.go when creating maintenance jobs
- Update tests to cover the new validation functionality
- Return boolean from ValidatePriorityClass to allow fallback behavior

This ensures maintenance jobs don't fail due to non-existent priority classes,
following the same pattern used for data mover pods.

Addresses feedback from:
https://github.com/vmware-tanzu/velero/pull/8883#discussion_r2238681442

Refs #8869

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

refactor: clean up priority class handling for data mover pods

- Fix comment in node_agent.go to clarify PriorityClassName is only for data mover pods
- Simplify server.go to use dataPathConfigs.PriorityClassName directly
- Remove redundant priority class logging from controllers as it's already logged during server startup
- Keep logging centralized in the node-agent server initialization

This reduces code duplication and clarifies the scope of priority class configuration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

refactor: remove GetDataMoverPriorityClassName from kube utilities

Remove GetDataMoverPriorityClassName function and its tests as priority
class is now read directly from dataPathConfigs instead of parsing from
ConfigMap. This simplifies the codebase by eliminating the need for
indirect ConfigMap parsing.

Refs #8869

🤖 Generated with [Claude Code](https://claude.ai/code)

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>

refactor: remove priority class validation from install command

Remove priority class validation during install as it's redundant
since validation already occurs during server startup. Users cannot
see console logs during install, making the validation warnings
ineffective at this stage.

The validation remains in place during server and node-agent startup
where it's more appropriate and visible to users.

Signed-off-by: Tiger Kaovilai <tkaovila@redhat.com>
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-06 01:36:22 -04:00
..
backup CLI automatically discovers and uses cacert from BSL for download requests 2025-07-29 22:25:52 -04:00
backuplocation fix require-error rule from testifylint 2025-06-23 15:39:54 +00:00
bug Enable errcheck linter and resolve found issues. 2023-04-28 09:33:42 +08:00
client Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
completion Enable errcheck linter and resolve found issues. 2023-04-28 09:33:42 +08:00
create Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
datamover data path for vgdp ms pvb 2025-06-03 13:25:48 +08:00
debug chore: define common aliases for k8s packages (#8672) 2025-04-22 06:14:47 -04:00
delete feat: add delete sub-command for backup-location (#3073) 2020-11-30 13:59:42 -05:00
describe Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
get Updates for org move to vmware-tanzu (#1920) 2019-09-30 17:26:56 -04:00
install Add priority class support for Velero server and node-agent 2025-08-06 01:36:22 -04:00
nodeagent Add priority class support for Velero server and node-agent 2025-08-06 01:36:22 -04:00
plugin Merge pull request #7584 from mmorel-35/json-patch/v5 2024-04-10 18:40:16 +08:00
podvolume vgdp ms pvr data path 2025-06-10 17:48:30 +08:00
repo Fix the `velero repo get` nil pointer issue. 2024-02-08 14:25:29 +08:00
repomantenance data path for vgdp ms pvb 2025-06-03 13:25:48 +08:00
restore CLI automatically discovers and uses cacert from BSL for download requests 2025-07-29 22:25:52 -04:00
schedule chore: define common aliases for k8s packages (#8672) 2025-04-22 06:14:47 -04:00
serverstatus Return error if timeout when checking server version (#9111) 2025-07-25 12:31:55 -04:00
snapshotlocation Remove dependency of generated client part 2 2023-11-03 17:11:36 +08:00
uninstall chore: define common aliases for k8s packages (#8672) 2025-04-22 06:14:47 -04:00
version Remove dependency of the legacy client code from pkg/cmd directory. 2023-07-14 15:55:09 +08:00
delete_options.go Add confirm flag to velero plugin add 2024-03-26 05:56:11 +07:00
select_option.go Enable staticcheck and resolve found issues. 2023-04-25 11:33:40 +08:00
select_option_test.go fix require-error rule from testifylint 2025-06-23 15:39:54 +00:00