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.

Migration to GenericKafkaListener failed if strimzi-operator was upgraded from 0.19.0=>0.20.1 (crd folder move)

See original GitHub issue

Describe the bug Migration to GenericKafkaListener failed if strimzi-operator was upgraded from 0.19.0=>0.20.1=>0.21.1

Error: UPGRADE FAILED: release kafka-test failed, and has been rolled back due to atomic being set: cannot patch "test" with kind Kafka: Kafka.kafka.strimzi.io "test" is invalid: spec.kafka.listeners: Invalid value: "array": spec.kafka.listeners in body must be of type object: "array"

script returned exit code 1

To Reproduce Steps to reproduce the behavior:

  1. install strimzi 0.19.0
  2. upgrade to 0.20.1, than 0.21.1 using hotfix script from https://github.com/strimzi/strimzi-kafka-operator/issues/3877#issuecomment-832750622
  3. try to switch to GenericKafkaListener listeners format
  4. See error
Error: UPGRADE FAILED: release kafka-test failed, and has been rolled back due to atomic being set: cannot patch "test" with kind Kafka: Kafka.kafka.strimzi.io "test" is invalid: spec.kafka.listeners: Invalid value: "array": spec.kafka.listeners in body must be of type object: "array"

Expected behavior Kafka should switched to GenericKafkaListener listeners format (array)

Environment (please complete the following information):

  • Strimzi version: [0.21.1]
  • Installation method: [Helm chart]
  • Kubernetes cluster: [1.20]
  • Infrastructure: [AKS]

Additional context I see your comment https://github.com/strimzi/strimzi-kafka-operator/issues/3727#issuecomment-704386494. But unfortunately I have no idea how to apply crd from 0.21.1 release now. Have no idea why helm did’t do this. By the way fresh install from 0.21.1 release works as expected.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
vutkincommented, Jun 23, 2021

I’ve applied them manually via next snippet but got same error:

VERSION=0.21.1
RELEASE_FOLDER="$VERSION"

helm repo add strimzi http://strimzi.io/charts/
helm repo update
[ -d "$RELEASE_FOLDER" ] && rm -rf "$RELEASE_FOLDER"
helm pull strimzi/strimzi-kafka-operator --version "$VERSION" -d ./\
  --untar \
  --untardir "$RELEASE_FOLDER"

kubectl diff \
  -f "$VERSION/strimzi-kafka-operator/crds" \

read -p "Are you sure? " -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]
then
  kubectl replace \
    --validate=false \
    -f "$VERSION/strimzi-kafka-operator/crds"
fi
0reactions
scholzjcommented, Oct 31, 2021

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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