Skip to content

fix: add podUpdatePolicy to all ComponentDefinition templates#2515

Open
Alegrowin wants to merge 1 commit intoapecloud:mainfrom
Alegrowin:fix/add-pod-update-policy-to-cmpd-templates
Open

fix: add podUpdatePolicy to all ComponentDefinition templates#2515
Alegrowin wants to merge 1 commit intoapecloud:mainfrom
Alegrowin:fix/add-pod-update-policy-to-cmpd-templates

Conversation

@Alegrowin
Copy link
Copy Markdown

Summary

When podUpdatePolicy is not explicitly set in cmpd templates, the KubeBlocks operator defaults it to PreferInPlace after creation. This changes the apps.kubeblocks.io/immutable-hash annotation, causing the addon controller to mark ComponentDefinitions as Unavailable with "immutable fields can't be updated" on next reconciliation.

Changes

Adds podUpdatePolicy: PreferInPlace to all 122 ComponentDefinition template files across all addons, ensuring the hash is stable from creation.

Affected addons: apecloud-mysql, clickhouse, elasticsearch, etcd, falkordb, greptimedb, influxdb, kafka, llm, loki, mariadb, milvus, minio, mogdb, mongodb, mysql, nebula, neo4j, neon, opensearch, orchestrator, orioledb, polardbx, postgresql, pulsar, qdrant, rabbitmq, redis, risingwave, rocketmq, starrocks-ce, tidb, vanilla-postgresql, victoria-metrics, weaviate, xinference, yashandb, zookeeper

Verification

  1. Install any addon (e.g. helm upgrade -i kb-addon-rabbitmq kubeblocks-addons/rabbitmq -n kubeblocks-system)
  2. Check ComponentDefinition has podUpdatePolicy: PreferInPlace set: kubectl get cmpd <name> -o yaml | grep podUpdatePolicy
  3. Verify hash remains stable across reconciliation cycles: kubectl get cmpd <name> -o jsonpath='{.metadata.annotations.apps\.kubeblocks\.io/immutable-hash}'

Companion PR

@apecloud-bot apecloud-bot added the chart-release Auto release chart when PR merged main. label Mar 20, 2026
@leon-ape
Copy link
Copy Markdown
Contributor

leon-ape commented Mar 20, 2026

It’s not necessary to explicitly set podUpdatePolicy in addon manifests after apecloud/kubeblocks#10095, because the actual compatibility issue is resolved by excluding these fields from cmpdHash().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chart-release Auto release chart when PR merged main.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants