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

Add volumeClaimTemplates label selector in zeebe statefulSet #1773

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kristeey
Copy link

Which problem does the PR fix?

This PR add possibility to use pre-provisioned PVs for zeebe, by doing the following:

  1. Add possibility to disable use of default storageClass in the zeebe statefulSet.
  2. Enable use of PVC label selector in zeebe statefulSet in order to bind the claim to the desired PV.

What's in this PR?

  1. .Values.zeebe.pvcStorageClassName is now checked if equal to "-" (following the standard in the bitnami helm charts)". If so: provide an empty string to the StorageClassName in order to prevent the kubernetes API from using the default storageClass (practically disabling storageClass usage). In earlier versions og this helm chart, whenever setting .Values.zeebe.pvcStorageClassName to "" explicitly, helm interpret this as nil and hence the default storage class is used (if any).
  2. .Values.zeebe.pvcSelector, when provided, will provide the possibility to bind PVCs and PVs based on labels. https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector

Example:

zeebe:
  ...
  pvcStorageClassName: "-"
  pvcSelector:
    matchLabels:
      pv-name: camunda-zeebe-0
    matchExpressions:
      - { key: sku, operator: In, values: [standard, premium] }

Checklist

Please make sure to follow our Contributing Guide.

Before opening the PR:

  • In the repo's root dir, run make go.update-golden-only.
  • There is no other open pull request for the same update/change.
  • Tests for charts are added (if needed).
  • In-repo documentation are updated (if needed).

After opening the PR:

  • Did you sign our CLA (Contributor License Agreement)? It will show once you open the PR.
  • Did all checks/tests pass in the PR?

@CLAassistant
Copy link

CLAassistant commented May 10, 2024

CLA assistant check
All committers have signed the CLA.

@@ -251,8 +251,17 @@ spec:
spec:
accessModes: {{ .Values.zeebe.pvcAccessModes }}
{{- if .Values.zeebe.pvcStorageClassName }}
{{- if (eq "-" .Values.zeebe.pvcStorageClassName) }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to make special handling here, using null as a value should have the same effect.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was added to follow bitnami standard. But if you want it removed I can change it

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need some handling here else the default storage class is used, which is not the desired outcome in cases where one wants to use pre provisioned PVs, hence not use storage classes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants