You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
## Description
#2180 introduced a bug and
this PR removes the cause of the bug.
Actions conditionals are being added to Zarf in
#2276 to allow these sort of
checks to account for various use cases in a more clean way.
Also reopened #1824
## Related Issue
Relates to #2273
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Other (security config, docs update, etc)
## Checklist before merging
- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed
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
Additional context
This would be the equivalent of the following action:
Though it may be worth considering a more expressive "assert" syntax that wraps these kinds of checks like
wait
does.The text was updated successfully, but these errors were encountered: