Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DevDeploy: validate --flavor input #665

Open
decleaver opened this issue Jun 6, 2024 · 0 comments
Open

DevDeploy: validate --flavor input #665

decleaver opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@decleaver
Copy link
Collaborator

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 <dir> --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 <dir> --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 zarf-dev/zarf#2587

@decleaver decleaver added the enhancement New feature or request label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant