defenseunicorns / defenseunicorns/uds-cli
DevDeploy: validate `--flavor` input
- Dominant language
- Go
- Stars
- 54
- Forks
- 21
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 43
Description
### Is your feature request related to a problem? Please describe.
If you attempt to run `uds dev deploy --flavor` with a flavor that doesn't exist, as long as there is a component you don't get an error or warning about passing in a bad flavor.
Example: (I know this one is silly) but if you do `uds dev deploy --flavor patchVersion9` it doesn't let you know you specified a bad flavor since you still have the `podinfo` component, but neither of the podinfo-flavor components get added to the created package.
zarf.yaml
```
kind: ZarfPackageConfig
metadata:
name: podinfo
version: 0.0.1
components:
- name: podinfo
required: true
charts:
- name: podinfo
version: 6.4.0
namespace: podinfo
url: https://github.com/stefanprodan/podinfo.git
gitPath: charts/podinfo
images:
- ghcr.io/stefanprodan/podinfo:6.4.0
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: podinfo
namespace: podinfo
condition: available
- name: podinfo-flavor
required: true
only:
flavor: patchVersion2
charts:
- name: podinfo
version: 6.6.2
namespace: podinfo-flavor
url: https://github.com/stefanprodan/podinfo.git
gitPath: charts/podinfo
images:
- ghcr.io/stefanprodan/podinfo:6.6.2
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: podinfo
namespace: podinfo-flavor
condition: available
- name: podinfo-flavor
required: true
only:
flavor: patchVersion3
charts:
- name: podinfo
version: 6.6.3
namespace: podinfo-flavor
url: https://github.com/stefanprodan/podinfo.git
gitPath: charts/podinfo
images:
- ghcr.io/stefanprodan/podinfo:6.6.3
actions:
onDeploy:
after:
- wait:
cluster:
kind: deployment
name: podinfo
namespace: podinfo-flavor
condition: available
```
### Describe the solution you'd like
- **Given** a zarf.yaml with components using flavors
- **When** running `zarf package create --flavor` with an invalid flavor
- **Then** I get a messaging saying something like "Learn how to spell buddy!" or "invalid flavor specified"
### Describe alternatives you've considered
(optional) A clear and concise description of any alternative solutions or features you've considered.
### Additional context
This is currently also how zarf works. Issue created there as well https://github.com/defenseunicorns/zarf/issues/2587
Contributor guide
Assessment
This issue has not been assessed yet.