-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
✨ ClusterClass: ensure templates are created in the Cluster namespace #11366
✨ ClusterClass: ensure templates are created in the Cluster namespace #11366
Conversation
@Danil-Grigorev: The label(s) In response to this:
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-sigs/prow repository. |
How do owner references work presently for Cluster and ClutserClass objects? Is there any relation between the two with respect to owner references? |
865ef0e
to
540f6de
Compare
Signed-off-by: Danil-Grigorev <[email protected]>
540f6de
to
0af1fb1
Compare
Hi @JoelSpeed 👋. I think in this case relationships are unchanged. This change touches creation of |
OK, so the intention of this patch, is that if the ClusterClass exists in a different namespace, we make sure to create a copy of the InfrastructureMachineTemplate in the Cluster namespace? Whereas today, the template would be created in the ClusterClass namespace? |
Yes, these are 2 other PRs which, once combined, make this change permit what the title says.
I tried to split the changes, so that it will be less complex to review, and does not introduce full scope of modifications in a single PR. Unfortunately, as a consequence, until these changes are merged (this PR and #11361), it is hard to introduce added e2e coverage which was requested by Fabrizio. |
Makes sense to me! /lgtm /test pull-cluster-api-e2e-main |
LGTM label has been added. Git tree hash: 0644d22508d6ec3e192aa77170bee85962c13f99
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
What this PR does / why we need it:
Creation of the infrastructure template in desired state for the
Cluster
is always using namespace of the template, whileCluster
object namespace is ignored. This changes behavior to useCluster
namespace for the generated template, which allows referencingClusterClass
from aCluster
resource located in different namespace, if validating policy allows it.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Related to #5673
/area clusterclass