nuvolaris / nuvolaris-bugs

Bug Bounty
0 stars 0 forks source link

operator does not detect default storage class when multiple ones are available #19

Closed francescotimperi closed 1 year ago

francescotimperi commented 1 year ago

The operator auto detect the storage class using this jsonpath {.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class)].metadata.name}

but this could bring to unpredictable result when more than one storage class is available and patches have been applied to update the default ones.

The above jsonpath should be updated to

{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io\/is-default-class=='true')].metadata.name}