weave-gitops
weave-gitops copied to clipboard
Flux Runtime view is empty when Flux is installed on OpenShift via OperatorHub
Describe the bug
WORKAROUND: kubectl label ns flux-system app.kubernetes.io/part-of='flux'
As a user of Weave GitOps I should be able to install Flux via my preferred method and benefit from the observability capabilities in Weave GitOps.
When running OpenShift, many users will install software via the Operator Catalog/Operator Hub.
After installing Flux via the community operator https://operatorhub.io/operator/flux and installing Weave GitOps as a HelmRepository and Helm Release, the Flux Runtime view is empty:

checking the network tab shows: {"deployments":[],"errors":[{"clusterName":"Default","namespace":"","message":"could not find flux namespace in cluster"}]}
Other views appear to work ok and show all resources:

Environment
- Weave-Gitops Version 0.9.0
- Flux Version 0.30.2
- Kubernetes version (CRC version: 2.5.1+5b02b826 / OpenShift version: 4.10.18 / K8s - v1.23.5+3afdacb)
To Reproduce Steps to reproduce the behavior:
- Go to https://console.redhat.com/openshift/create/local
- Download CRC
- Run
crc setup,crc config set memory 16384,crc start,crc console - login to openshift console using kubeadmin (password provided after
crc start - Install the Flux Operator
- Create a HelmRepository and HelmRelease to install Weave GitOps
- Expose the ww-gitops service as a route (can do via
oc expose service ww-gitops-weave-gitops -n flux-system) - Login to dashboard
- Navigate to Flux Runtime view
- See error -->
Expected behaviour
See the Flux controllers
Actual Behavior
Blank page
flux-system namespace
OpenShift: k describe ns flux-system Name: flux-system Labels: kubernetes.io/metadata.name=flux-system Annotations: openshift.io/sa.scc.mcs: s0:c25,c0 openshift.io/sa.scc.supplemental-groups: 1000600000/10000 openshift.io/sa.scc.uid-range: 1000600000/10000 Status: Active
Kind k describe ns flux-system Name: flux-system Labels: app.kubernetes.io/instance=flux-system app.kubernetes.io/part-of=flux app.kubernetes.io/version=v0.31.2 kubernetes.io/metadata.name=flux-system kustomize.toolkit.fluxcd.io/name=flux-system kustomize.toolkit.fluxcd.io/namespace=flux-system pod-security.kubernetes.io/warn=restricted pod-security.kubernetes.io/warn-version=latest
Closing in favour of the fix in the operator
Re-opening to cover a fallback of using flux-system cc @ozamosi