Skip to content

Commit

Permalink
Merge pull request #115 from francescotimperi/static-web-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
francescotimperi authored Sep 24, 2023
2 parents 96ce414 + 008295c commit b77a51f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nuvolaris/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def get_default_storage_class():
"""
Get the storage class attempting to get the default storage class defined on the configured kubernetes environment
"""
storage_class = kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class)].metadata.name}")
storage_class += kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.beta\.kubernetes\.io\/is-default-class)].metadata.name}")
storage_class = kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class=='true')].metadata.name}")
storage_class += kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.beta\.kubernetes\.io\/is-default-class=='true')].metadata.name}")
if(storage_class):
return storage_class[0]

Expand All @@ -70,8 +70,8 @@ def get_default_storage_provisioner():
"""
Get the storage provisioner
"""
provisioner = kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class)].provisioner}")
provisioner += kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.beta\.kubernetes\.io\/is-default-class)].metadata.name}")
provisioner = kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class=='true')].provisioner}")
provisioner += kube.kubectl("get", "storageclass", jsonpath="{.items[?(@.metadata.annotations.storageclass\.beta\.kubernetes\.io\/is-default-class=='true')].metadata.name}")
if(provisioner):
return provisioner[0]

Expand Down

0 comments on commit b77a51f

Please sign in to comment.