Skip to content
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

✨ Add classNamespace to topology #11352

Merged

Conversation

Danil-Grigorev
Copy link
Member

@Danil-Grigorev Danil-Grigorev commented Oct 30, 2024

What this PR does / why we need it:

Adding classNamespace variable to the cluster topology, which allows to point to a ClusterClass in a different namespace. This field is dormant, and is used for differentiation only.

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

@k8s-ci-robot k8s-ci-robot added area/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2024
@Danil-Grigorev Danil-Grigorev changed the title Add classNamespace to topology ✨ Add classNamespace to topology Oct 30, 2024
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch 2 times, most recently from ae1cb19 to 43cb995 Compare October 30, 2024 11:59
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 30, 2024
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch 2 times, most recently from 2bddeeb to 352fd66 Compare October 30, 2024 15:20
Copy link
Contributor

@salasberryfin salasberryfin left a comment

Choose a reason for hiding this comment

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

Thanks @Danil-Grigorev! I added a small suggestion but I think this looks good.

@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from 352fd66 to bd8a56f Compare October 31, 2024 09:51
@salasberryfin
Copy link
Contributor

Thanks @Danil-Grigorev

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c4b418743a4683ae623b3264aae7636c41ad5675

@salasberryfin
Copy link
Contributor

/assign @chrischdi

@Danil-Grigorev Danil-Grigorev changed the title ✨ Add classNamespace to topology [WIP] ✨ Add classNamespace to topology Oct 31, 2024
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 31, 2024
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from bd8a56f to 4bbb218 Compare October 31, 2024 18:34
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 31, 2024
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 31, 2024
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from 4bbb218 to d450768 Compare October 31, 2024 18:44
@Danil-Grigorev Danil-Grigorev changed the title [WIP] ✨ Add classNamespace to topology ✨ Add classNamespace to topology Oct 31, 2024
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from 681bdbd to ebdc21d Compare January 15, 2025 16:02
api/v1beta1/index/cluster.go Outdated Show resolved Hide resolved
api/v1beta1/index/cluster.go Outdated Show resolved Hide resolved
internal/topology/check/compatibility_test.go Outdated Show resolved Hide resolved
internal/topology/check/compatibility_test.go Outdated Show resolved Hide resolved
internal/topology/check/compatibility_test.go Outdated Show resolved Hide resolved
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch 3 times, most recently from 2b2278a to 9a67d48 Compare January 16, 2025 12:56
Copy link
Member

@sbueringer sbueringer left a comment

Choose a reason for hiding this comment

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

One very last nit. Please squash the commits. I don't remember the details but I'm not sure if we have some problems with merge commits

api/v1beta1/cluster_types.go Outdated Show resolved Hide resolved
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from c68381d to dd90304 Compare January 17, 2025 12:28
- Add documentation on securing cross-namespace access for CC
- Add ByClusterClassRef index
- Support cross-ns CC rebase

Signed-off-by: Danil-Grigorev <[email protected]>
@Danil-Grigorev Danil-Grigorev force-pushed the class-namespace-addition branch from dd90304 to ecdfa14 Compare January 17, 2025 12:47
@sbueringer
Copy link
Member

sbueringer commented Jan 17, 2025

Thank you very much!

/lgtm

/assign @chrischdi @fabriziopandini

/hold
We should wait with merge until #11395 is also ready (it adds the corresponding e2e tests)

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 17, 2025
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 17, 2025
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 9360879ac2877e429557d43eba40121ab5590e79

@sbueringer
Copy link
Member

/test pull-cluster-api-e2e-main

@Danil-Grigorev
Copy link
Member Author

/cherry-pick release-1.9

@k8s-infra-cherrypick-robot

@Danil-Grigorev: once the present PR merges, I will cherry-pick it on top of release-1.9 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.9

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.

Copy link
Member

@fabriziopandini fabriziopandini left a comment

Choose a reason for hiding this comment

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

Kudos to @Danil-Grigorev for the perseverance and patience in implementing this long time awaited feature, well done!
/lgtm
/approve

WRT to https://github.com/kubernetes-sigs/cluster-api/pull/11352/files#r1915130884, I would suggest to open a follow up PR to deprecate the old index

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 21, 2025
@Danil-Grigorev
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 22, 2025
@k8s-ci-robot k8s-ci-robot merged commit 5a5e957 into kubernetes-sigs:main Jan 22, 2025
21 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.10 milestone Jan 22, 2025
@k8s-infra-cherrypick-robot

@Danil-Grigorev: new pull request created: #11730

In response to this:

/cherry-pick release-1.9

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/clusterclass Issues or PRs related to clusterclass cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet