Skip to content

Commit

Permalink
update(helm): update api version capability check
Browse files Browse the repository at this point in the history
Update api version check cinclude kind along with apiversion.

Signed-off-by: Shovan Maity <shovan.cse91@gmail.com>
  • Loading branch information
shovanmaity authored and kmova committed Jul 17, 2021
1 parent 3cef351 commit 79ef09c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: CStor-Operator helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.11.1
version: 2.11.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 2.11.0
Expand Down
4 changes: 3 additions & 1 deletion deploy/helm/charts/templates/snapshot-class.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ if or (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1/VolumeSnapshotClass") (.Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1/VolumeSnapshotClass") }}
kind: VolumeSnapshotClass
apiVersion: {{ if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1" -}}
apiVersion: {{ if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1beta1/VolumeSnapshotClass" -}}
snapshot.storage.k8s.io/v1beta1
{{- else -}}
snapshot.storage.k8s.io/v1
Expand All @@ -10,3 +11,4 @@ metadata:
snapshot.storage.kubernetes.io/is-default-class: "true"
driver: cstor.csi.openebs.io
deletionPolicy: Delete
{{- end }}

0 comments on commit 79ef09c

Please sign in to comment.