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

VolumePermissionEnricher : Use .spec.storageClassName instead of annotation to set PersistentVolume class #1361

Closed
rohanKanojia opened this issue Mar 18, 2022 · 1 comment · Fixed by #1642
Assignees
Milestone

Comments

@rohanKanojia
Copy link
Member

Description

Right now we seem to be using volume.beta.kubernetes.io/storage-class annotation to provide the class of PersistentVolume.

https://github.com/eclipse/jkube/blob/d5653eeaedfcda146065e1b674040114ff3be1b0/jkube-kit/enricher/generic/src/main/java/org/eclipse/jkube/enricher/generic/VolumePermissionEnricher.java#L192-L194

However, as per Kubernetes docs, this annotation will be marked as deprecated:

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#class

In the past, the annotation volume.beta.kubernetes.io/storage-class was used instead of the storageClassName attribute. This annotation is still working; however, it will become fully deprecated in a future Kubernetes release

We should refactor VolumePermissionEnricher to set storageClassName field in .spec instead of setting deprecated annotation

@manusa
Copy link
Member

manusa commented Mar 23, 2022

We should refactor VolumePermissionEnricher to set storageClassName field in .spec instead of setting deprecated annotation

Or maybe keep both approaches for backwards compatibility?

@manusa manusa added this to the 1.8.0 milestone Mar 23, 2022
@manusa manusa modified the milestones: 1.8.0, 1.9.0 May 23, 2022
@rohanKanojia rohanKanojia self-assigned this Jun 30, 2022
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jun 30, 2022
…rageClassName` instead of annotation to set PersistentVolume class (eclipse-jkube#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
rohanKanojia added a commit to rohanKanojia/jkube that referenced this issue Jul 12, 2022
…rageClassName` instead of annotation to set PersistentVolume class (eclipse-jkube#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit to rohanKanojia/jkube that referenced this issue Jul 25, 2022
…rageClassName` instead of annotation to set PersistentVolume class (eclipse-jkube#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit to rohanKanojia/jkube that referenced this issue Jul 25, 2022
…rageClassName` instead of annotation to set PersistentVolume class (eclipse-jkube#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
manusa pushed a commit that referenced this issue Jul 25, 2022
…rageClassName` instead of annotation to set PersistentVolume class (#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
baruKreddy pushed a commit to baruKreddy/jkube that referenced this issue Aug 11, 2022
…rageClassName` instead of annotation to set PersistentVolume class (eclipse-jkube#1361)

VolumePermissionEnricher should now add StorageClass name in
`.spec.storageClassName` field instead of an annotation in metadata.

Add a new configuration field `useStorageClassAnnotation` in VolumePermissionEnricher
configuration for backward compatibility. User can switch back to
annotation by setting this field to `true`.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants