-
Notifications
You must be signed in to change notification settings - Fork 4
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
Flux installation with Openshift and OLM into a dedicated namespace #21
Comments
The new Flux Operator allows setting a different namespace than flux-system, just make sure to create the FluxInstance custom resource in the same namespace where the operator has been installed. https://operatorhub.io/operator/flux-operator |
Good. Does it support multi-tenancy ? |
Yes, see the docs here: https://fluxcd.control-plane.io/operator/fluxinstance/#cluster-configuration |
Is there a way to specify the name of the ServiceAccount because the |
The dedicated SA should be specified on the Flux Kustomization/HelmRelease objects under Docs:
You can also change the default with a patch like so: apiVersion: fluxcd.controlplane.io/v1
kind: FluxInstance
spec:
kustomize:
patches:
- patch: |
- op: add
path: /spec/template/spec/containers/0/args/-
value: --default-service-account=flux
target:
kind: Deployment
name: "(kustomize-controller|helm-controller)" |
It tested the patch and it didn't replace the arg, it adds: spec:
containers:
- args:
- --events-addr=http://notification-controller.mpms-flux-operator.svc.cluster.local./
- --watch-all-namespaces=true
- --log-level=info
- --log-encoding=json
- --enable-leader-election
- --no-cross-namespace-refs=true
- --no-remote-bases=true
- --default-service-account=default
- --concurrent=10
- --requeue-dependency=5s
- --default-service-account=flux In the logs, I can see it uses the last args |
This how it suppose to work, Flux flags support overriding, last one listed wins. |
Anyway, let's move this conversation to the flux-operator repo. |
I created this issue controlplaneio-fluxcd/flux-operator#44 |
Hello,
I created the following issue to flux repo but it seems for Openshift deployment, it should be there.
Issue: fluxcd/flux2#4816
Describe the bug
Hello,
I installed Flux v2.3.0 on my lab Openshift 4.14 platform into a dedicated namespace, mpms-fluxcd-operator, using Operator Livecycle Manager (OLM).
But all the controllers have the default namespace
flux-system
hard-coded in their deployment args--events-addr=http://notification-controller.flux-system.svc.cluster.local./
You should use the variable
RUNTIME_NAMESPACE
or replace the url by--events-addr=http://notification-controller/
Steps to reproduce
Expected behavior
Args should be : - --events-addr=http://notification-controller.mpms-fluxcd-operator.svc.cluster.local./
Screenshots and recordings
No response
OS / Distro
OpenShift 4.14
Flux version
2.3.0
Flux check
no more details
Git provider
No response
Container Registry provider
No response
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: