-
Notifications
You must be signed in to change notification settings - Fork 251
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
bug: Arg --disable-component-controllers still not working properly #1212
Comments
I tried but can't reproduce it in my local environment. Some debug suggestions:
The correct ones should have the following: |
This is in operator deployment manifest: containers:
- name: fluent-operator
image: >-
srsng-docker.artifactory.healthcare.siemens.com/kubesphere/fluent-operator:v2.9.0
args:
- '--disable-component-controllers="fluentd"' |
Try |
Thanks, but that's not the point. The point is that probably the helm template may be wrong and it will construct final helm chart with wrong value. No matter if I set this operator:
disableComponentControllers: fluentd or this operator:
disableComponentControllers: "fluentd" to my values file, the result is still the same |
Hey, same issue here. The following appears in the deployment manifest:
|
I did see a recent change about this feature. see templates/fluent-operator-deployment.yaml Can you please check whether your template is the same with the latest one? |
Hey, thanks for the swift reply. From my helm release version, the fix you mentioned should already be there. helm-release version: 2.9.0 values.yaml:
Rendered manifest:
Error:
Using your suggestion, patching the deployment manifest with
works fine. |
I just tried again with the latest version helm, generated manifest is correct. |
Hmm, that's weird. Especially because the mentioned fix was released with 2.9.0 but is not in the deployment template of the artifacthub.com 2.9.0 chart, which still shows:
Any idea where this comes from? |
I am facing the same issue @SvenThies but in my case the quotes seem to be fine but empty: kubectl get deployment.apps/fluent-operator -n fluent -o yaml | grep args -A 5 -B 5
labels:
app.kubernetes.io/component: operator
app.kubernetes.io/name: fluent-operator
spec:
containers:
- args:
- --disable-component-controllers=""
env:
- name: NAMESPACE
valueFrom:
fieldRef: Is this expected, should it not be Although except for this error, I think my rest of the logs of operator seem to look fine: kubectl logs -n fluent pod/fluent-operator-58ff575d4c-twg7w
Defaulted container "fluent-operator" out of: fluent-operator, setenv (init)
2024-06-28T13:03:00Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}
2024-06-28T13:03:00Z ERROR setup {"error": "incorrect value for `-disable-component-controllers` and it will not be proceeded (possible values are: fluent-bit, fluentd)"}
main.main
/workspace/main.go:121
runtime.main
/usr/local/go/src/runtime/proc.go:267
2024-06-28T13:03:00Z INFO setup starting manager
2024-06-28T13:03:00Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
2024-06-28T13:03:00Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.Secret"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.ServiceAccount"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterFluentBitConfig"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.DaemonSet"}
2024-06-28T13:03:00Z INFO Starting Controller {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBitConfig"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterInput"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterFilter"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterOutput"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterParser"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterMultilineParser"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.Filter"}
2024-06-28T13:03:00Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.Output"} |
Also an update to it, if I do: helm upgrade fluent-operator fluent/fluent-operator --version 2.9.0 --namespace fluent --set operator.disableComponentControllers="fluent-bit" I do get the updated deployment: kubectl get deployment.apps/fluent-operator -n fluent -o yaml | grep args -A 5 -B 5
labels:
app.kubernetes.io/component: operator
app.kubernetes.io/name: fluent-operator
spec:
containers:
- args:
- --disable-component-controllers="fluent-bit"
env:
- name: NAMESPACE
valueFrom:
fieldRef: However, the error still surfaces in logs: kubectl logs -n fluent pod/fluent-operator-85f648d4cb-j7hp8
Defaulted container "fluent-operator" out of: fluent-operator, setenv (init)
2024-06-28T14:28:50Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}
2024-06-28T14:28:50Z ERROR setup {"error": "incorrect value for `-disable-component-controllers` and it will not be proceeded (possible values are: fluent-bit, fluentd)"}
main.main
/workspace/main.go:121
runtime.main
/usr/local/go/src/runtime/proc.go:267
2024-06-28T14:28:50Z INFO setup starting manager
2024-06-28T14:28:50Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
2024-06-28T14:28:50Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.ServiceAccount"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.DaemonSet"}
2024-06-28T14:28:50Z INFO Starting Controller {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "source": "kind source: *v1alpha1.Fluentd"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "source": "kind source: *v1.ServiceAccount"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "source": "kind source: *v1.DaemonSet"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.Secret"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.ClusterFluentBitConfig"}
2024-06-28T14:28:50Z INFO Starting EventSource {"controller": "fluen |
I think there is a problem with the latest release (v2.9.0) to the helm registry. As mentioned by @cw-Guo, the argument should look like this in the deployment template:
As I saw, there was some problems with the release of v2.8.0. |
I think I have identified the problem and trying to work on a fix too. it seems like the value from helm is being parsed incorrectly:
Which is the reason why it is reporting it, it reads it as |
Created a fix #1222 and it works fine with helm install locally now kubectl logs -n fluent pod/fluent-operator-7df5b4d96b-scphc ✔ kind-kind ⎈
Defaulted container "fluent-operator" out of: fluent-operator, setenv (init)
2024-06-28T15:45:05Z INFO controller-runtime.metrics Metrics server is starting to listen {"addr": ":8080"}
2024-06-28T15:45:05Z INFO setup starting manager
2024-06-28T15:45:05Z INFO Starting server {"path": "/metrics", "kind": "metrics", "addr": "[::]:8080"}
2024-06-28T15:45:05Z INFO Starting server {"kind": "health probe", "addr": "[::]:8081"}
2024-06-28T15:45:05Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T15:45:05Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.ServiceAccount"}
2024-06-28T15:45:05Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1.DaemonSet"}
2024-06-28T15:45:05Z INFO Starting Controller {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit"}
2024-06-28T15:45:05Z INFO Starting EventSource {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "source": "kind source: *v1alpha2.FluentBit"}
2024-06-28T15:45:05Z INFO Starting EventSource {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "source": "kind source: *v1alpha1.Fluentd"} |
IMHO fixing this in the code base doesn't make any sense. The chart from the repo (main and tag v2.9.0) works just fine. We need to fix the release. |
i do think this is a release issue, but i am not familiar with the release process. @benjaminhuo can you please help take a look at the helm release v2.9? Thanks! |
@wenchajun You'll need to sync the fluent operator chart to https://github.com/fluent/helm-charts/tree/main/charts/fluent-operator without any modification |
Describe the issue
When helm value for "operator.disableComponentControllers" is provided when installing fluent-operator, it fails to properly pass it to operator runtime. Following error will appear in operator log:
2024-06-18T15:20:52Z ERROR setup {"error": "incorrect value for
-disable-component-controllers
and it will not be proceeded (possible values are: fluent-bit, fluentd)"}To Reproduce
Install/upgrade fluent-operator and provide following value in value file for example
Expected behavior
When correct value is provided for operator.disableComponentControllers, it is correctly propagated to operator
Your Environment
How did you install fluent operator?
Via helm chart:
Values file contents:
Additional context
No response
The text was updated successfully, but these errors were encountered: