-
Notifications
You must be signed in to change notification settings - Fork 226
Closed
Labels
enhancement ✨New feature or requestNew feature or request
Milestone
Description
Is your feature request related to a problem? Please describe.
The registry / gitea packages require a storage class / pvc to operate and it would be nice to have them check for the existence of such a storage class before they try to run.
Describe the solution you'd like
- Given I have a cluster configured without a storage class
- When I initialize Zarf with the registry or gitea
- Then I receive an error telling me that the storage class is misconfigured (instead of a permanent pending pod)
Additional context
This would be the equivalent of the following action:
actions:
onDeploy:
before:
- description: Check that the cluster has the correct storage class
maxRetries: 0
cmd: |
CLUSTER_STORAGE_CLASSES=$(./zarf tools kubectl get -A StorageClass -o jsonpath={$.items[*].metadata.name})
if [ -n "${CLUSTER_STORAGE_CLASSES}" && -n "${CLUSTER_STORAGE_CLASSES##*${ZARF_STORAGE_CLASS}*}" ]; then echo "the Zarf init registry package requires a configured storage class to function"; fi
Though it may be worth considering a more expressive "assert" syntax that wraps these kinds of checks like wait does.
Metadata
Metadata
Assignees
Labels
enhancement ✨New feature or requestNew feature or request