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

Set default service account for an OLM install #184

Closed
erikgb opened this issue Feb 21, 2025 · 2 comments · Fixed by #188
Closed

Set default service account for an OLM install #184

erikgb opened this issue Feb 21, 2025 · 2 comments · Fixed by #188

Comments

@erikgb
Copy link

erikgb commented Feb 21, 2025

We are installing Flux Operator using OLM (from operatorhub), and all our clusters are multi-tenant. To provide our users with a good UX, we have configured the Flux default service account to a service account that is pre-created in all our end-user Flux namespaces, with the RBAC permissions normally given to end-users. This works great!

While experimenting with the new ResourceSet, I noticed that the default service account when reconciling is flux-operator, and I can not find a way to override this default in Flux Operator. Is this possible to configure as you obviously can when installing using Helm, ref. the multitenancy.defaultServiceAccount value. Would it be possible to make this configurable to us as cluster admins?

@stefanprodan
Copy link
Member

stefanprodan commented Feb 22, 2025

The issue is that the RedHat Subscription does not allow setting container args, as an OpenShift admin you can only set environment variables. We could expose the SA default as an env var that when set would override the cmd flag. With this your subscription could be:

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: flux-operator
  namespace: flux-system
spec:
  channel: stable
  installPlanApproval: Automatic
  name: flux-operator
  source: operatorhubio-operators
  sourceNamespace: openshift-marketplace
  config:
    env:
    - name: DEFAULT_SERVICE_ACCOUNT
      value: "sa-name"

@erikgb
Copy link
Author

erikgb commented Feb 22, 2025

Yeah, this would work for us! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants