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

Remove chart-name from volumeClaimTemplate's label section for working chart upgrades #368

Merged
merged 1 commit into from
Jul 31, 2023

Conversation

hasancelik
Copy link
Collaborator

@hasancelik hasancelik commented Jul 28, 2023

When user enables persistence/hotRestart at values.yaml as I mentioned above, the chart creates required PVs via volumeClaimTemplate. Unfortunately, we are using dynamic labels at volumeClaimTemplate section at StatefulSet yaml:
https://github.com/hazelcast/charts/blob/master/stable/hazelcast-enterprise/templates/statefulset.yaml#L242

  volumeClaimTemplates:
  - metadata:
      name: hot-restart-persistence
      labels:
        app.kubernetes.io/name: hazelcast-enterprise
        --> helm.sh/chart: hazelcast-enterprise-3.10.3 <--
        app.kubernetes.io/instance: "hz"
        app.kubernetes.io/managed-by: "Helm"
  volumeClaimTemplates:
  - metadata:
      name: hot-restart-persistence
      labels:
        app.kubernetes.io/name: hazelcast-enterprise
        --> helm.sh/chart: hazelcast-enterprise-5.0.0 <--
        app.kubernetes.io/instance: "hz"
        app.kubernetes.io/managed-by: "Helm"

Due to dynamic labeling, we are hitting the issue below:
helm/charts#7803

Error: UPGRADE FAILED: cannot patch "hz-hazelcast-enterprise" with kind StatefulSet: StatefulSet.apps "hz-hazelcast-enterprise" is invalid: spec: Forbidden: updates to statefulset spec for fields other than 'replicas', 'ordinals', 'template', 'updateStrategy', 'persistentVolumeClaimRetentionPolicy' and 'minReadySeconds' are forbidden

This label changes during helm upgrade prevents any future upgrade of existing release.

To provide a successful upgrade from 4.2.x to 5.0.x, we need to release additional new charts:

@hasancelik hasancelik added the bug Something isn't working label Jul 28, 2023
@hasancelik hasancelik requested review from a team, SeriyBg and semihbkgr and removed request for a team July 28, 2023 15:26
@hasancelik hasancelik merged commit 809062d into hazelcast:master Jul 31, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working safe-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants