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

expose persistentVolumeClaimRetentionPolicy in StarRocks operator CRD #400

Open
mingmxu opened this issue Jan 17, 2024 · 3 comments
Open
Labels
enhancement New feature or request

Comments

@mingmxu
Copy link
Contributor

mingmxu commented Jan 17, 2024

Describe the current behavior

Currently it uses the default behaviour, Retain for both whenDeleted and whenScaled. It leaves PVC un-used when a cluster is deleted or scaled.

Describe the enhancement

By exposing persistentVolumeClaimRetentionPolicy, user could specify different policies explicitly. For example Retain for production cluster, Delete for test/ephemeral clusters.

Additional context

@mingmxu mingmxu added the enhancement New feature or request label Jan 17, 2024
@mingmxu mingmxu changed the title expose persistentVolumeClaimRetentionPolicy in FE/BE component expose persistentVolumeClaimRetentionPolicy in StarRocks helm chart Jan 17, 2024
@mingmxu mingmxu changed the title expose persistentVolumeClaimRetentionPolicy in StarRocks helm chart expose persistentVolumeClaimRetentionPolicy in StarRocks operator CRD Jan 17, 2024
@yandongxiao
Copy link
Collaborator

    persistentVolumeClaimRetentionPolicy describes the lifecycle of persistent
    volume claims created from volumeClaimTemplates. By default, all persistent
    volume claims are created as needed and retained until manually deleted.
    This policy allows the lifecycle to be altered, for example by deleting
    persistent volume claims when their stateful set is deleted, or when their
    pod is scaled down. This requires the StatefulSetAutoDeletePVC feature gate
    to be enabled, which is alpha.  +optional
    StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used
    for PVCs created from the StatefulSet VolumeClaimTemplates.

StatefulSetAutoDeletePVC is in alpha state, and my k8s version is v1.27.3.
So, Event we expose it, It may not take effect on user's k8s environment.

@zy2xu
Copy link

zy2xu commented Jul 3, 2024

I have the same problem. Is there a workaround other than manually delete?

@yandongxiao
Copy link
Collaborator

‌‌‌Besides manual deletion, there is no other way at present.
Directly exposing the persistentVolumeClaimRetentionPolicy field of the StatefulSet may lead to non-effectiveness of the field due to different users' Kubernetes versions.
I think it can be accomplished by the Operator: provide a option (for example, named persistentVolumeClaimRetentionPolicy), which allows the Operator to be responsible for deleting the corresponding PVC after the StarRocksCluster is deleted.

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

No branches or pull requests

3 participants