-
Notifications
You must be signed in to change notification settings - Fork 109
🐛 Return error when customizing non-existent containers #915
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
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Previously, when a user specified container customizations in the provider spec for a container that doesn't exist in the deployment, the operator would silently ignore the configuration. This made it difficult to debug misconfigured provider specs. This change adds error handling to the `customizeContainer` function to return an error when no matching container is found in the deployment. The error message includes both the container name and deployment name to help users quickly identify and fix the issue. This makes the error handling consistent with the existing pattern used for manager container validation.
36f209a to
c801d50
Compare
|
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
|
/check-cla |
|
Unknown CLA label state. Rechecking for CLA labels. Send feedback to sig-contributor-experience at kubernetes/community. /check-cla |
furkatgofurov7
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: furkatgofurov7 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
alexander-demicev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
LGTM label has been added. Git tree hash: f1db50ef1e80f07a18f92f86514dd8669facbbcc
|
What this PR does / why we need it:
Previously, when a user specified container customizations in the provider spec for a container that doesn't exist in the deployment, the operator would silently ignore the configuration. This made it difficult to debug misconfigured provider specs.
This change adds error handling to the
customizeContainerfunction to return an error when no matching container is found in the deployment. The error message includes both the container name and deployment name to help users quickly identify and fix the issue.This makes the error handling consistent with the existing pattern used for manager container validation.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #