question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

strimz-kafka-operator restarting kafka due to fluxcd

See original GitHub issue

Describe the bug We started using strimz-kafka-operator recently and it was overall smooth (thank you!).

We ran into some problems with fluxcd (The GitOps tool we use https://fluxcd.io/): strimz-kafka-operator would restart kafka sometimes when we push a change. Looking a bit into it and it seems that some lables added by fluxcd, triggered strimz-kafka-operator to do a rolling update.

Expected behavior strimzi-kafka-operator ignore all fluxcd tags.

Environment (please complete the following information):

  • Strimzi version: main
  • Installation method: YAML files via fluxcd
  • Kubernetes cluster: Kubernetes 1.20
  • Infrastructure: Amazon EKS

YAML files and logs

This is the log from the operator: https://gist.github.com/kangzhang/13cec69ce30079b94d4f3bf41631d6a6 . You can see that the operator detected some label changes by fluxcd: https://gist.github.com/kangzhang/13cec69ce30079b94d4f3bf41631d6a6#file-gistfile1-txt-L244 and triggered a rolling update: https://gist.github.com/kangzhang/13cec69ce30079b94d4f3bf41631d6a6#file-gistfile1-txt-L267

Additional context

I’m wondering if we could black list fluxcd labels? The are only used by fluxcd to track the deployment and should not be used by strimzi.

Here are some example labels fluxcd would add:

              kustomize.toolkit.fluxcd.io/checksum=77dd8897619d50e2035bafbfe0b41e22cea893cd
              kustomize.toolkit.fluxcd.io/name=environment
              kustomize.toolkit.fluxcd.io/namespace=flux-system

I also read thru #2558 and #5083 . The flag STRIMZI_LABELS_EXCLUSION_PATTERN does not seem to help. (I already set to "(^app.kubernetes.io/(?!part-of).*|^kustomize.toolkit.fluxcd.io.*)" and you can see it in log file too: https://gist.github.com/kangzhang/13cec69ce30079b94d4f3bf41631d6a6#file-gistfile1-txt-L69

Thanks!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
scholzjcommented, Jul 2, 2021

FYI: I opened #5245 to exclude these by default.

1reaction
nicknotfuncommented, Jul 1, 2021

The main labels are a by-product of garbage collection, listed here: https://fluxcd.io/docs/components/kustomize/kustomization/#garbage-collection

The Flux process is on reconciling a change to the source repository it marks any resources with these labels, so that if later the item is removed from the source, it knows which items to GC

Read more comments on GitHub >

github_iconTop Results From Across the Web

Frequently asked questions - Flux CD
Rollout restarts add a “restartedAt” annotation, which flux will remove, re-deploying the pods. To complete a rollout restart successfully, ...
Read more >
Flux CD
Flux is a set of continuous and progressive delivery solutions for Kubernetes, and they are open and extensible. The APIs of Flux are...
Read more >
Migration - Flux CD
Flux Legacy and Helm Operator have been archived. This means that development and support by the Flux Community has been stopped indefinitely. We...
Read more >
Installation - Flux CD
The key is also used to create a deploy key in the GitHub repository. The new deploy key will be linked to the...
Read more >
Flux from End-to-End - Flux CD
... the precautions with regard to sensitive and/or secret data and flow of information related to sensitive access, is out of the scope...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found