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
Drop kas call in agent ReconcileCAPIInfraCR and fail if no ign #1469
Drop kas call in agent ReconcileCAPIInfraCR and fail if no ign #1469
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: enxebre 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 |
✅ Deploy Preview for hypershift-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
/lgtm |
This add unit tests and fixes the ReconcileCAPIInfraCR agent implementation to avoid an unncesesary kas call to fetch the HCP, since all needed info is available already. Aditionally it returns early if there's no ign endpoint to ensure we create the agentCluster only after ignition endpoint exists so AgentClusterInstall is only created with the right ign to boot machines. https://bugzilla.redhat.com/show_bug.cgi?id=2097895 https://github.com/openshift/assisted-service/blob/241ad46db74add5f16e153f5f7ba0a5496fb06ba/pkg/validating-webhooks/hiveextension/v1beta1/agentclusterinstall_admission_hook.go#L185 https://github.com/openshift/cluster-api-provider-agent/blob/master/controllers/agentcluster_controller.go#L126
cbfb6f2
to
9a0308a
Compare
New changes are detected. LGTM label has been removed. |
/hold cancel |
@enxebre: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What this PR does / why we need it:
This add unit tests and fixes the ReconcileCAPIInfraCR agent implementation to avoid an unncesesary kas call to fetch the HCP, since all needed info is available already.
Aditionally it returns early if there's no ign endpoint to ensure we create the agentCluster only after ignition endpoint exists so AgentClusterInstall is only created with the right ign to boot machines.
https://bugzilla.redhat.com/show_bug.cgi?id=2097895
https://github.com/openshift/assisted-service/blob/241ad46db74add5f16e153f5f7ba0a5496fb06ba/pkg/validating-webhooks/hiveextension/v1beta1/agentclusterinstall_admission_hook.go#L185
https://github.com/openshift/cluster-api-provider-agent/blob/master/controllers/agentcluster_controller.go#L126
This change honours the following statement:
For AgentClusterInstall/ClusterDeployment if the input is empty, the value is defaulted so the field is optional and immutable. For CAPI is effectively required and immutable.
Which issue(s) this PR fixes (optional, use
fixes #<issue_number>(, fixes #<issue_number>, ...)
format, where issue_number might be a GitHub issue, or a Jira story:Fixes #
Checklist