vinzscam/backstage-chart

Default values broken

Sturgelose opened this issue · 2 comments

Helm Version: version.BuildInfo{Version:"v3.6.3", GitCommit:"d506314abfb5d21419df8c7e7e68012379db2354", GitTreeState:"clean", GoVersion:"go1.16.5"}

Trying to install backstage I get the following error:

To install the repo:

helm install --debug my-release backstage-chart/backstage
helm update

To install the chart

helm install --debug my-release backstage/backstage  
install.go:173: [debug] Original chart version: ""
install.go:190: [debug] CHART PATH: /home/sturgelose/.cache/helm/repository/backstage-0.3.0.tgz

Error: YAML parse error on backstage/templates/backstage-deployment.yaml: error converting YAML to JSON: yaml: line 32: mapping values are not allowed in this context
helm.go:88: [debug] error converting YAML to JSON: yaml: line 32: mapping values are not allowed in this context

Seems there is some kind of issue in here. Been investigating but I do not really have a solution yet.

I'm using the default values.yaml and even trying setting the image and postgres password, but nothing.

The problem is related to the fact that no image is declared within the values.yaml file

backstage:
  image:
    registry: ""
    repository: ""
    tag: ""

or passed to the command to install the chart

helm template --dry-run --debug my-release backstage/backstage
install.go:178: [debug] Original chart version: ""
install.go:195: [debug] CHART PATH: /Users/cmoullia/Library/Caches/helm/repository/backstage-0.3.0.tgz

---
# Source: backstage/templates/backstage-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-release-backstage
  namespace: "default"
  labels:
    app.kubernetes.io/name: backstage
    helm.sh/chart: backstage-0.3.0
    app.kubernetes.io/instance: my-release
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/component: backstage
  annotations:
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: backstage
      app.kubernetes.io/instance: my-release
      app.kubernetes.io/component: backstage
  template:
    metadata:
      labels:
        app.kubernetes.io/name: backstage
        helm.sh/chart: backstage-0.3.0
        app.kubernetes.io/instance: my-release
        app.kubernetes.io/managed-by: Helm
        app.kubernetes.io/component: backstage
    spec:
      volumes:
      containers:
        - name: backstage-backend
          image: : ### EMPTY IMAGE NAME
          imagePullPolicy: "Always"
          command:
            - node
            - packages/backend

That should work if you execute this command

helm template --dry-run --debug my-release backstage/backstage \
  --set backstage.image.repository=backstage \
  --set backstage.image.registry=docker.io \
  --set backstage.image.tag=1.0

@vinzscam We should add some input validation: https://austindewey.com/2018/12/28/helm-tricks-input-validation-with-required-and-fail/

Closed by #16