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

feat: add v2prov kubeconfig label patching #178

Merged
merged 4 commits into from
Oct 11, 2023

Conversation

richardcase
Copy link
Contributor

@richardcase richardcase commented Oct 3, 2023

What this PR does / why we need it:

This change adds a controller that watches for v2prov kubeconfig secrets. It will then add the owned label (if it doesn't exist) as this is required by CAPI 1.5.0 and higher.

It has been added as a feature that needs to be enabled so that we can disable it in the future when the changes in Rancher have merged and are generally available.

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 #179

Special notes for your reviewer:

This adds a new e2e test suite that is very similar to the existing v2prov suite. In time we would consider making this new suite the test for v2prov....when we bump CAPI to v1.5.x in all our tests.

Checklist:

  • squashed commits into logical changes
  • includes documentation
  • adds unit tests
  • adds or updates e2e tests

@richardcase richardcase force-pushed the patch_v2prov_secrets branch 2 times, most recently from 1ebd4c8 to 74e00a4 Compare October 6, 2023 13:35
@richardcase richardcase changed the title [WIP] feat: add v2prov kubeconfig label patching feat: add v2prov kubeconfig label patching Oct 6, 2023
@richardcase richardcase marked this pull request as ready for review October 6, 2023 13:42
@richardcase richardcase requested a review from a team as a code owner October 6, 2023 13:42
internal/controllers/patch_kcfg_controller.go Outdated Show resolved Hide resolved
@richardcase richardcase force-pushed the patch_v2prov_secrets branch 2 times, most recently from 94380bd to 0d2aee3 Compare October 10, 2023 13:16
This change adds a controller that watches for v2prov kubeconfig
secrets. It will then add the owned label (if it doesn't exist) as this
is required by CAPI 1.5.0 and higher.

It has been added as a feature that needs to be enabled so that we can
disable it in the future when the changes in Rancher have merged and are
generally available.

Additionally, this adds a new test suite that ensure that the Rancher label patcher
work and that a v2prov cluster can be provisined with CAPI 1.5.x.

In the future we can use this test to ensure we don't break v2prov
instead of the existing test. Although the current test is done against
the HEAD version of Rancher which is valuable.

Signed-off-by: Richard Case <[email protected]>
furkatgofurov7
furkatgofurov7 previously approved these changes Oct 11, 2023
feature/feature.go Show resolved Hide resolved
feature/gates.go Show resolved Hide resolved
internal/rancher/provisioning/v1/rke.go Show resolved Hide resolved
Signed-off-by: Richard Case <[email protected]>
@richardcase richardcase merged commit 9f1683c into rancher:main Oct 11, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically add required labels for CAPI 1.5.x
5 participants