bug: operator pod restarting due to controller-runtime.source errors
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- docker, go, helm, kubernetes
- 領域
- devops, infrastructure
調査の方向性
まず、失敗するイメージの作成に使用される cmd/fluent-manager/Dockerfile、Makefile、go build の呼び出しを比較します。カスタムイメージを使用して Helm のインストールを再現し、動作する kubesphere/fluent-operator:v2.8.0 イメージと併せてオペレーターのログを調査します。カスタムイメージが、Pod の再起動や MultilineParser と ClusterMultilineParser の CRD が見つからないというエラーなしで実行されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the issue
I'm running into an issue building a fluent-operator image using the Makefile, or using the go build ... invocation and packaging the resulting manager binary into an image. Either approach results in pod restarts when deploying the operator.
The errors look like the following:
kubectl logs -n fluent fluent-operator-55dd7bc945-kthgm
Example MultilineParser error using docker build image
2024-05-28T13:21:44Z ERROR controller-runtime.source if kind is a CRD, it should be installed before calling Start {"kind": "MultilineParser.fluentbit.fluent.io", "error": "no matches for kind \"MultilineParser\" in version \"fluentbit.fluent.io/v1alpha2\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:154
k8s.io/apimachinery/pkg/util/wait.waitForWithContext
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/wait.go:207
k8s.io/apimachinery/pkg/util/wait.poll
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:260
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
/go/pkg/mod/k8s.io/[email protected]/pkg/util/wait/poll.go:200
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/source/source.go:136
Example ClusterMultilineParser from go build... image
2024-05-28T14:22:17Z INFO Starting workers {"controller": "fluentbit", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "FluentBit", "worker count": 1}
2024-05-28T14:22:17Z ERROR controller-runtime.source if kind is a CRD, it should be installed before calling Start {"kind": "ClusterMultilineParser.fluentbit.fluent.io", "error": "no matches for kind \"ClusterMultilineParser\" in version \"fluentbit.fluent.io/v1alpha2\""}
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1.1
/var/cache/melange/gomodcache/sigs.k8s.io/[email protected]/pkg/source/source.go:143
k8s.io/apimachinery/pkg/util/wait.runConditionWithCrashProtectionWithContext
/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/wait.go:154
k8s.io/apimachinery/pkg/util/wait.poll
/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/poll.go:245
k8s.io/apimachinery/pkg/util/wait.PollImmediateUntilWithContext
/var/cache/melange/gomodcache/k8s.io/[email protected]/pkg/util/wait/poll.go:200
sigs.k8s.io/controller-runtime/pkg/source.(*Kind).Start.func1
/var/cache/melange/gomodcache/sigs.k8s.io/[email protected]/pkg/source/source.go:136
2024-05-28T14:22:18Z INFO Starting workers {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "worker count": 1}
2024-05-28T14:22:18Z INFO Starting workers {"controller": "collector", "controllerGroup": "fluentbit.fluent.io", "controllerKind": "Collector", "worker count": 1}
2024-05-28T14:22:18Z INFO Starting workers {"controller": "fluentd", "controllerGroup": "fluentd.fluent.io", "controllerKind": "Fluentd", "worker count": 1}
Both methods will show both Cluster/Multiline errors and the pod will restart. The operator will however create fluent-bit and fluentd pods given the appropriate manifest.
To Reproduce
build the image
cat VERSION
v2.8.0
docker build --platform linux/arm64 -f cmd/fluent-manager/Dockerfile . -t k3d-k3d.localhost:5005/fluent-operator:v2.8.0
docker push k3d-k3d.localhost:5005/fluent-operator:v2.8.0
helm install
helm repo add fluent https://fluent.github.io/helm-charts
helm install fluent-operator --create-namespace -n fluent fluent/fluent-operator --set operator.container.repository=k3d-k3d.localhost:5005/fluent-operator --set operator.container.tag=v2.8.0
Expected behavior
The pod should not be restarting and throwing errors about CRDs.
Your Environment
- Fluent Operator version:
v2.8.0 - Container Runtime:
containerd://1.7.15-k3s1 - Operating system:
ID=wolfi
NAME="Wolfi"
PRETTY_NAME="Wolfi"
VERSION_ID="20230201"
HOME_URL="https://wolfi.dev"
- Kernel version:
Linux d186e0ca7a21 6.6.16-linuxkit #1 SMP Fri Feb 16 11:54:02 UTC 2024 aarch64 Linux
How did you install fluent operator?
Using helm:
helm repo add fluent https://fluent.github.io/helm-charts
helm install fluent-operator --create-namespace -n fluent fluent/fluent-operator --set operator.container.repository=k3d-k3d.localhost:5005/fluent-operator --set operator.container.tag=v2.8.0
Additional context
Running with the kubesphere/fluent-operator:v2.8.0 image explicitly, or by not setting the operator.container.repository value in the helm chart results in no errors.
- 主要言語
- Go
- スター
- 689
- フォーク
- 333
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 41
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fluent/fluent-operator のほかの issue
-
bug: fluent-bit image still ships vulnerable libbrotli1 (CVE-2026-111497)対応中かも @joshuabaird が 9 日前に担当しました。 オープンfluent-bit security
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
fluent/fluent-operator#2082 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
fluent/fluent-operator#1990 · コメント 6 件 ·
メンテナーはふだん 2 日以内に返信
-
enhancement fluent-bit good first issue
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
fluent/fluent-operator#1854 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Remove tag consideration from Fluentd ClusterFilter / Filter order対応中かも @cvas22 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
fluent/fluent-operator#1832 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
fluent/fluent-operator#1831 ·
メンテナーはふだん 2 日以内に返信
fluent/fluent-operator の issue をすべて見る
似ている issue
-
automated-triage type/bug type/ci
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
hashicorp/terraform-provider-google#30678 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
ethereum-optimism/optimism#24120 ·
メンテナーはふだん 1 日以内に返信
-
area/docs
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
meshery/meshery#23375 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
ApplicationSet: BitBucket Cloud SCM provider returns corrupted error (%!w(<nil>)) when a branch has no commit hash対応中かも @AP24110011695 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信