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 CAPI cluster role to helm chart #500

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

alexander-demicev
Copy link
Member

CAPI controller was moved into a separate pod, previously it was embedded into Rancher. CAPI controller interacts with elemental resources and this migration requires a separate set of RBAC rules for the new CAPI pod, current permissions are limited to the upstream resources and rancher specific objects, elemental CRs are not included. This PR adds a cluster role with required permissions, it will be merged later as an aggregated role with the CAPI controller one.

@alexander-demicev alexander-demicev requested a review from a team as a code owner August 24, 2023 10:35
@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (08934ee) 51.50% compared to head (3899111) 51.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #500   +/-   ##
=======================================
  Coverage   51.50%   51.50%           
=======================================
  Files          41       41           
  Lines        5551     5551           
=======================================
  Hits         2859     2859           
  Misses       2443     2443           
  Partials      249      249           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anmazzotti
Copy link
Contributor

anmazzotti commented Aug 24, 2023

I'm missing a bit of context.

In my understanding, the elemental-operator is not using CAPI.
A cluster is defined through the provisioning.cattle.io/v1 API, creating a kind: Cluster resource.

If the provisioning.cattle.io/v1 contract changed (for example because automatic conversion to CAPI happens), then I'm not sure this will still work.

@kkaempf
Copy link
Contributor

kkaempf commented Aug 24, 2023

How to fix existing deployments ?
Is a helm upgrade sufficient ?

@fgiudici
Copy link
Member

How to fix existing deployments ? Is a helm upgrade sufficient ?

Yep, it should as the new resource will be deployed on upgrade.

Copy link
Member

@fgiudici fgiudici left a comment

Choose a reason for hiding this comment

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

We will need this in any case to allow Rancher CAPI to support elemental.
Thanks @alexander-demicev !

@juadk
Copy link
Contributor

juadk commented Aug 24, 2023

Tested successfully with:

  • K3s as downstream and upstream cluster v1.26.5+k3s1
  • Rancher manager v2.7.7-rc4
  • Latest dev Elemental operator
  • Stable UI Extension

I added the new cluster role before provisioning my cluster:
image

@fgiudici fgiudici merged commit f1f3c32 into rancher:main Aug 24, 2023
@kkaempf kkaempf added the kind/bug Something isn't working label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants