Skip to content

Conversation

@HarrisonWAffel
Copy link
Contributor

Issue: rancher/backup-restore-operator#642, rancher/rancher#48995

Problem

When the backup restore operator attempts to restore a snapshot taken from a rancher version including the PC and PDB feature, the webhook will attempt to validate the cluster-agent-default-priority-class and cluster-agent-default-pod-disruption-budget settings even if they have not been customized. This results in a json marshaling error, blocking the request. This issue will only reproduce when attempting to reapply the default settings json through BRO or manually. Manual reproduction steps can be found in the linked BRO issue.

Solution

Add a conditional to ensure that the setting is only validated if it has been customized.

CheckList

  • Test
  • Docs
    • No documentation updates required

@HarrisonWAffel HarrisonWAffel requested a review from a team March 5, 2025 17:01
@HarrisonWAffel HarrisonWAffel requested a review from a team as a code owner March 5, 2025 17:01
Copy link
Member

@jiaqiluo jiaqiluo left a comment

Choose a reason for hiding this comment

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

It seems impossible for newSetting to be a nil point.
LGMT.

@mallardduck mallardduck requested a review from crobby March 5, 2025 18:04
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.

4 participants