Skip to content

✨ Wire up Service Account - #1038

Merged
everettraven merged 10 commits into
operator-framework:mainfrom
theishshah:wireup-sa
Jul 18, 2024
Merged

✨ Wire up Service Account#1038
everettraven merged 10 commits into
operator-framework:mainfrom
theishshah:wireup-sa

Conversation

@theishshah

Copy link
Copy Markdown
Contributor

Description

#973 Add functionality to use Service Account

@openshift-ciopenshift-ciBot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 11, 2024
@netlify

netlifyBot commented Jul 11, 2024

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commitd1eb632
🔍 Latest deploy loghttps://app.netlify.com/sites/olmv1/deploys/66995b9c2bb9d100086b47f6
😎 Deploy Previewhttps://deploy-preview-1038--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecovBot commented Jul 11, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.

Project coverage is 72.25%. Comparing base (aff11ee) to head (d1eb632).
Report is 3 commits behind head on main.

FilesPatch %Lines
cmd/manager/main.go63.15%4 Missing and 3 partials ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #1038 +/- ##
==========================================
- Coverage 72.50% 72.25% -0.26% 
==========================================
Files 32 32 Lines 1884 1903 +19 ==========================================
+ Hits 1366 1375 +9 - Misses 383 389 +6 - Partials 135 139 +4 
FlagCoverage Δ
e2e56.00% <63.15%> (+0.78%)⬆️
unit44.50% <0.00%> (-0.45%)⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@openshift-merge-robotopenshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2024
Comment threadcmd/manager/main.go
cfgGetter, err := helmclient.NewActionConfigGetter(mgr.GetConfig(), mgr.GetRESTMapper(),
helmclient.StorageNamespaceMapper(installNamespaceMapper),
helmclient.ClientNamespaceMapper(installNamespaceMapper),
helmclient.RestConfigMapper(restConfigMapper),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If this lands soon, all good. But just wanted to let you know that I'm working on making REST config mapping handle storage and client interactions separately. The intent is that we would use our own service account for storage (since that is an implementation detail of our controller) and we would only use the ClusterExtension's service account for the helm client's REST config.

See:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the heads up! I spoke with @theishshah and I think we will focus on getting this in using the soon-to-be-deprecated RestConfigMapper option and as a follow up address this (if the helm-operator-plugins changes land before this gets in)

@openshift-merge-robotopenshift-merge-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jul 17, 2024
@theishshahtheishshah changed the title [WIP] Wire up Service AccountWire up Service AccountJul 18, 2024
Ish Shah added 9 commits July 18, 2024 11:10
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
Signed-off-by: Ish Shah <ishah@redhat.com>
@openshift-merge-robotopenshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 18, 2024
@theishshahtheishshah changed the title Wire up Service Account✨ Wire up Service AccountJul 18, 2024
@theishshah
theishshah marked this pull request as ready for review July 18, 2024 18:11
@theishshah
theishshah requested a review from a team as a code ownerJuly 18, 2024 18:11
@openshift-ciopenshift-ciBot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 18, 2024
Signed-off-by: Ish Shah <ishah@redhat.com>

@tmshorttmshort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2024
Comment on lines +120 to +121
//+kubebuilder:rbac:groups=core,resources=serviceaccounts/token,verbs=create
//+kubebuilder:rbac:groups=apiextensions.k8s.io,resources=customresourcedefinitions,verbs=get

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For other reviewers, the serviceaccounts/token permissions were required to get tokens for a provided SA and the customresourcedefinitions permissions are for the CRD Upgrade Safety preflight checks

@everettraven
everettraven added this pull request to the merge queue Jul 18, 2024
Merged via the queue into operator-framework:main with commit 95b9f0dJul 18, 2024
joelanford added a commit to joelanford/operator-controller that referenced this pull request Jul 19, 2024
github-merge-queueBot pushed a commit that referenced this pull request Jul 19, 2024
perdasilva pushed a commit to LalatenduMohanty/operator-controller that referenced this pull request Aug 13, 2024
* add logic to return service account
Signed-off-by: Ish Shah <ishah@redhat.com>
* update permissions and anon token
Signed-off-by: Ish Shah <ishah@redhat.com>
* updated role yaml
Signed-off-by: Ish Shah <ishah@redhat.com>
* clean up imports
Signed-off-by: Ish Shah <ishah@redhat.com>
* update e2e tests
Signed-off-by: Ish Shah <ishah@redhat.com>
* fix lint
Signed-off-by: Ish Shah <ishah@redhat.com>
* extension developer test fixed
Signed-off-by: Ish Shah <ishah@redhat.com>
* stand up sa for upgrade test
Signed-off-by: Ish Shah <ishah@redhat.com>
* fixed upgrade test
Signed-off-by: Ish Shah <ishah@redhat.com>
* linting for extension test
Signed-off-by: Ish Shah <ishah@redhat.com>
---------
Signed-off-by: Ish Shah <ishah@redhat.com>
perdasilva pushed a commit to kevinrizza/operator-controller that referenced this pull request Aug 13, 2024
* add logic to return service account
Signed-off-by: Ish Shah <ishah@redhat.com>
* update permissions and anon token
Signed-off-by: Ish Shah <ishah@redhat.com>
* updated role yaml
Signed-off-by: Ish Shah <ishah@redhat.com>
* clean up imports
Signed-off-by: Ish Shah <ishah@redhat.com>
* update e2e tests
Signed-off-by: Ish Shah <ishah@redhat.com>
* fix lint
Signed-off-by: Ish Shah <ishah@redhat.com>
* extension developer test fixed
Signed-off-by: Ish Shah <ishah@redhat.com>
* stand up sa for upgrade test
Signed-off-by: Ish Shah <ishah@redhat.com>
* fixed upgrade test
Signed-off-by: Ish Shah <ishah@redhat.com>
* linting for extension test
Signed-off-by: Ish Shah <ishah@redhat.com>
---------
Signed-off-by: Ish Shah <ishah@redhat.com>
@skattojuskattoju mentioned this pull request Sep 25, 2024
4 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@theishshah@joelanford@tmshort@everettraven@openshift-merge-robot