-
Notifications
You must be signed in to change notification settings - Fork 615
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 logs
not compatible with OLM flux
operator
#1673
Comments
cc: @chanwit FYI – there are probably at least 3 separate issues here, I may not have identified all the places in flux this affects.
We could add documentation to better support users who need to know about the ClusterRoleBinding problem, when The front-page "Easy Install" button instructions on OLM's Operator Hub webpage do not suggest This might be a small minority of users, as I think we've discussed before most OLM users are using OpenShift. But the |
@kingdonb I think this is an easy fix: add the |
That would be a great idea, except I don't think the label is missing yet at the point of time where that kustomize build is invoked. It extracts I'll move this discussion over to flux2-openshift, we can discuss how to resolve it there. |
I tweaked the release steps to include labels to the deployments in v0.16.2. @kingdonb could you test v0.16.2 from OperatorHub please? |
This issue is fixed in Flux Operator v0.16.2 🎉 Same for |
Describe the bug
The
flux logs
command does not work with OperatorHub version of Flux. This is true even when the operator is properly installed influx-system
namespace, I had other issues becauseoperators
is the namespace used by default, so my first guess was--flux-namespace
option was needed, but that didn't help.I checked the code for logs to find out why this is happening, it starts by looking for deployments to pull logs from:
flux2/cmd/flux/logs.go
Line 85 in eba6706
The OLM / OperatorHub version of Flux Operator does not include the label:
app.kubernetes.io/instance
so that seems pretty clearcut to explain why it doesn't work.I am unsure how to suggest fixing this, should the operator include this label? OLM can manage several instances of Flux, if I understand the point of OLM, they can be at different versions. Or should we adjust
flux logs
to search for deployments in a different way which is compatible with the OLM installation?The labels on the deployment include these:
The pod spec labels section has this one only (the label varies by app):
As indicated below in
flux check
output, the same problem affects us there.Steps to reproduce
Install the current version of Operator Lifecycle Manager as documented at OperatorHub (click the Install button to find this instruction), only if needed (this is not needed for OpenShift users, but is needed on vanilla Kubernetes instances):
Install the krew
operator
plugin, or use another method like OpenShift Console to install Flux in theflux-system
namespace:Create the
flux-system
namespace if needed, and usekubectl-operator
to install Flux (this ensures the service accounts are properly bound through the ClusterRoleBinding, otherwise source-controller fails leader election):Make any flux resources to ensure that some logs are generated, a GitRepo and Kustomization for example, and use
flux logs
to try to review the logs:(There is no output of
flux logs
)Expected behavior
You should see the logs, but no output is returned.
Screenshots and recordings
No response
OS / Distro
MacOS 10.15.7
Flux version
Flux (Operator) v0.16.1
Flux check
$ flux check
► checking prerequisites
✔ kubectl 1.22.0-rc.0 >=1.18.0-0
✔ Kubernetes 1.22.0-rc.0 >=1.16.0-0
► checking controllers
✔ all checks passed
(the
flux check
output indicates the same problem exists there)Git provider
N/A
Container Registry provider
N/A
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: