fluxcd / flux2

Open and extensible continuous delivery solution for Kubernetes. Powered by GitOps Toolkit.
https://fluxcd.io
Apache License 2.0
6.56k stars 607 forks source link

Flux installation with Openshift and OLM into a dedicated namespace #4816

Closed blezoray closed 5 months ago

blezoray commented 5 months ago

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).

apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: fluxcd-operator
  namespace: mpms-fluxcd-operator
spec:
  channel: stable
  installPlanApproval: Manual
  name: flux
  source: community-operators
  sourceNamespace: openshift-marketplace
  startingCSV: flux.v2.3.0

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./

      labels:
        app: kustomize-controller
    spec:
      containers:
      - args:
        - --events-addr=http://notification-controller.flux-system.svc.cluster.local./
        - --watch-all-namespaces=true
        - --log-level=info
        - --log-encoding=json
        - --enable-leader-election

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

stefanprodan commented 5 months ago

The OLM installer is not supported by the Flux maintainers, this was a Weaveworks project: https://github.com/weaveworks/flux2-openshift

See here the recommend way to install Flux on OpenShift: https://fluxcd.io/flux/installation/configuration/openshift/