fluent / fluent/fluent-operator
bug: Encountering Errors and Warnings During Helm install fluent-operator
- Dominant language
- Go
- Stars
- 682
- Forks
- 328
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 13
Description
### Describe the issue
- Encountering Errors and Warnings During Helm install fluent-operator
```powershell
$ helm install fluent-operator -n fluentbit ./fluent-operator/
W0430 21:57:57.912852 19520 warnings.go:70] unknown field "spec.securityContext.capabilities"
W0430 21:57:57.912852 19520 warnings.go:70] unknown field "spec.securityContext.privileged"
W0430 21:57:57.912852 19520 warnings.go:70] unknown field "spec.securityContext.readOnlyRootFilesystem"
Error: INSTALLATION FAILED: failed to refresh resource information: fluentbits.fluentbit.fluent.io "fluent-bit" not found
$ helm list -n fluentbit
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
fluent-operator fluentbit 1 2024-04-30 21:57:43.0906769 -0400 EDT failed fluent-operator-2.8.0 2.8.0
```
- The deployment seems ok
```powershell
$ kubectl get fluentbits.fluentbit.fluent.io -n fluentbit
NAME AGE
fluent-bit 13h
$ kubectl get all -n fluentbit
NAME READY STATUS RESTARTS AGE
pod/fluent-bit-8sdnh 1/1 Running 0 9h
pod/fluent-bit-9xgm2 1/1 Running 0 9h
pod/fluent-bit-dtqw9 1/1 Running 0 9h
pod/fluent-bit-fdm9f 1/1 Running 0 9h
pod/fluent-bit-g54tw 1/1 Running 0 9h
pod/fluent-bit-t7dw9 1/1 Running 0 9h
pod/fluent-bit-vk27g 1/1 Running 0 9h
pod/fluent-bit-wlhvz 1/1 Running 0 9h
pod/fluent-bit-xx5g4 1/1 Running 0 9h
pod/fluent-operator-5d466549cb-s8cn6 1/1 Running 0 9h
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/fluent-bit ClusterIP x.x.x.x 2020/TCP 9h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/fluent-bit 9 9 9 9 9 9h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/fluent-operator 1/1 1 1 9h
NAME DESIRED CURRENT READY AGE
replicaset.apps/fluent-operator-5d466549cb 1 1 1 9h
```
- I made these changes in values.yaml for supporting non root user
```powershell
# initContainers test run as non root user
initContainers:
- name: chowner-fb-storage
image: registry.hub.docker.com/library/alpine:3.12.0
command: ["chown", "3301:3301", "/fluent-bit"]
securityContext:
readOnlyRootFilesystem: true
capabilities:
drop: ["all"]
add: ["CHOWN"]
runAsUser: 0
runAsNonRoot: false
volumeMounts:
- name: positions
mountPath: /fluent-bit
```
- changes in fluentbit-fluentBit.yaml
```powershell
{{- if .Values.fluentbit.initContainers }}
initContainers:
{{ toYaml .Values.fluentbit.initContainers | indent 4 }}
{{- end }}
```
### To Reproduce
run "helm install fluent-operator -n fluentbit ./fluent-operator/" with above changes
### Expected behavior
no warning and Error with "helm install fluent-operator -n fluentbit ./fluent-operator/"
### Your Environment
```markdown
- Fluent Operator version: v2.8.0
- Container Runtime: containerd://1.7.7-1
- Operating system: Ubuntu 22.04.4 LTS
- Kernel version: 5.15.0-1057-azure
```
### How did you install fluent operator?
helm install fluent-operator -n fluentbit ./fluent-operator/
### Additional context
_No response_
Contributor guide
Research direction
Reproduce the Helm installation with the reported values.yaml and fluentbit-fluentBit.yaml changes, then inspect the rendered resources and installation output. Verify that the security-context warnings and the fluentbits resource lookup error no longer occur; the deployment and Fluent Bit resources should still be created successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100