Skip to content
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: Installation of Fluent-Operator does not install all CRDs #1377

Open
sherwoodzern opened this issue Oct 15, 2024 · 2 comments
Open

bug: Installation of Fluent-Operator does not install all CRDs #1377

sherwoodzern opened this issue Oct 15, 2024 · 2 comments

Comments

@sherwoodzern
Copy link

Describe the issue

Doing a helm install such as:
helm install fluent-operator --create-namespace -n fluent-operator https://github.com/fluent/fluent-operator/releases/download/v3.2.0/fluent-operator.tgz

results in an error in the deployment of the operator and the fluent-bit pods. The following are the errors:

2024-10-15T21:08:13Z ERROR controller-runtime.source.EventHandler if kind is a CRD, it should be installed before calling Start {"kind": "FluentBitConfig.fluentbit.fluent.io", "error": "no matches for kind "FluentBitConfig" in version "fluentbit.fluent.io/v1alpha2""}
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind[...]).Start.func1.1
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:71
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext.func1
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:53
k8s.io/apimachinery/pkg/util/wait.loopConditionUntilContext
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/loop.go:54
k8s.io/apimachinery/pkg/util/wait.PollUntilContextCancel
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:33
sigs.k8s.io/controller-runtime/pkg/internal/source.(*Kind[...]).Start.func1
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/source/kind.go:64

To Reproduce

helm install -f custom-values.yaml fluent-operator --create-namespace -n fluent-operator https://github.com/fluent/fluent-operator/releases/download/v3.2.0/fluent-operator.tgz

Expected behavior

I would expect the operator to be successfully installed and the fluent-bit pods to be deployed

Your Environment

- Fluent Operator version: 3.2.0
- Container Runtime: crio
- Operating system: linux
- Kernel version: 8.x

How did you install fluent operator?

helm install -f custom-values.yaml fluent-operator --create-namespace -n fluent-operator https://github.com/fluent/fluent-operator/releases/download/v2.6.0/fluent-operator.tgz

Additional context

No response

@patrick-stephens
Copy link

I'm not seeing this error locally with a fresh cluster (KIND) and a helm install:

$ kind create cluster
Creating cluster "kind" ...
 ✓ Ensuring node image (kindest/node:v1.31.0) 🖼
 ✓ Preparing nodes 📦  l
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ ^[[A
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-kind"
You can now use your cluster with:

kubectl cluster-info --context kind-kind

Not sure what to do next? 😅  Check out https://kind.sigs.k8s.io/docs/user/quick-start/
➜  ~ helm install fluent-operator --create-namespace -n fluent https://github.com/fluent/fluent-operator/releases/download/v3.2.0/fluent-operator.tgz
NAME: fluent-operator
LAST DEPLOYED: Wed Oct 16 11:07:44 2024
NAMESPACE: fluent
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
Thank you for installing  fluent-operator
Your release is named    fluent-operator

To learn more about the release ,try:
   $ helm status  fluent-operator  -n  fluent
   $ helm get  fluent-operator  -n fluent

All pods are up, no errors I can see in the logs:

kubectl get pods -A
NAMESPACE            NAME                                         READY   STATUS    RESTARTS   AGE
fluent               fluent-bit-ftllb                             1/1     Running   0          2m28s
fluent               fluent-operator-f79c6bfd6-cd7st              1/1     Running   0          2m39s
kube-system          coredns-6f6b679f8f-5sqcv                     1/1     Running   0          2m53s
kube-system          coredns-6f6b679f8f-b22ds                     1/1     Running   0          2m53s
kube-system          etcd-kind-control-plane                      1/1     Running   0          2m59s
kube-system          kindnet-tg89d                                1/1     Running   0          2m53s
kube-system          kube-apiserver-kind-control-plane            1/1     Running   0          2m59s
kube-system          kube-controller-manager-kind-control-plane   1/1     Running   0          2m59s
kube-system          kube-proxy-g69kw                             1/1     Running   0          2m53s
kube-system          kube-scheduler-kind-control-plane            1/1     Running   0          2m59s
local-path-storage   local-path-provisioner-57c5987fd4-59tqd      1/1     Running   0          2m53s

@patrick-stephens
Copy link

I think you have an older installation of the operator in your cluster in which case the docs show how to replace the CRDs for it: https://github.com/fluent/fluent-operator?tab=readme-ov-file#deploy-fluent-operator-with-helm
You do have something in your issue saying you installed 2.6.0 which is what makes me think this is it.

Helm by default does not touch existing CRDs - that's a design decision made by the Helm team: https://helm.sh/docs/chart_best_practices/custom_resource_definitions/#some-caveats-and-explanations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants