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

Fail fast in Helm Templated fields #5072

Closed
msonnleitner opened this issue Nov 26, 2020 · 0 comments · Fixed by #5158
Closed

Fail fast in Helm Templated fields #5072

msonnleitner opened this issue Nov 26, 2020 · 0 comments · Fixed by #5158
Labels
area/deploy deploy/helm kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.

Comments

@msonnleitner
Copy link

Expected behavior

There is a closed issue/PR #2793 which implements fail fast behaviour a for a specific field: EnvTemplate. Therefore, for consistency other templated field might also fail fast for consistency.

Actual behavior

When starting helm deployment without the given env variable using
skaffold run

it results in helm errors

Helm release <no value>-service not installed. Installing...
Error: create: failed to create: Secret "sh.helm.release.v1.<no value>-service.v1" is invalid: [metadata.name: Invalid value: 
"sh.helm.release.v1.<no value>-service.v1": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*'), metadata.labels: Invalid value: "<no value>-service": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')]

Information

  • Skaffold version: v1.17.0
  • Operating system: MacOS Catalina
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta8
kind: Config
metadata:
  name: some-service
build:
  artifacts:
    - image: eu.gcr.io/tools-org/some-service
      docker:
        dockerfile: Dockerfile
deploy:
  helm:
    releases:
      - name: "{{.ISTIO_SUBSET}}-some-service"
        chartPath: helm/some-service
        artifactOverrides:
          image: eu.gcr.io/tools-org/some-service
        setValueTemplates:
          istio.version: "{{.ISTIO_SUBSET}}-v1"
      - name: "{{.ISTIO_SUBSET}}-some-service-istio"
        chartPath: helm/istio
        setValueTemplates:
          context: "{{.ISTIO_SUBSET}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/deploy deploy/helm kind/feature-request priority/p3 agreed that this would be good to have, but no one is available at the moment.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants