Skaffold: Add option for helm deployments to create namespace

Created on 16 Jul 2020  路  4Comments  路  Source: GoogleContainerTools/skaffold

Helm has the option --create-namespace and the option --namespace. Let's please add an option in the skaffold.yaml to use the option --create-namespace

Expected behavior

Deploy succeeds

Actual behavior

Error: create: failed to create: namespaces "aws-sns" not found
deploying "aws-sns": install: exit status 1

Information

  • Skaffold version: version...
  • Operating system: ...
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta5
kind: Config
build:
  local:
    push: false
  artifacts:
    - image: aws-sns
      context: ../
      sync:
        manual:
          - src: 'app/src/**/*.js'
            dest: ../src
      docker:
        dockerfile: docker/Dockerfile
        buildArgs:
          NODE_ENVIRONMENT: development

deploy:
  kubeContext: trk8s
  helm:
    releases:
      - name: "aws-sns"
        chartPath: ./aws-sns
        namespace: aws-sns
        valuesFiles:
          - aws-sns/values.yaml
          - aws-sns/local.values.yaml
        setValues:
          "nodejs.image.tag": ""

Steps to reproduce the behavior

  1. Try to apply a skaffold config to a namespace that does not exist
  2. See the error
aredeploy deplohelm help wanted kinfeature-request prioritp3

All 4 comments

seems reasonable to me. don't think we can prioritize this right now but contributions very much welcome

I will work on a PR in next couple of weeks

found work around in this case (with helm3)
```yaml
flags:
install: ["--create-namespace"]
````

Sorry haven't had time to work on this yet

Was this page helpful?
0 / 5 - 0 ratings

Related issues

strikeout picture strikeout  路  4Comments

yurchenkosv picture yurchenkosv  路  3Comments

r2d4 picture r2d4  路  3Comments

garvincasimir picture garvincasimir  路  4Comments

heroic picture heroic  路  4Comments