devspace icon indicating copy to clipboard operation
devspace copied to clipboard

Component chart can't create an ingress

Open withinboredom opened this issue 3 years ago • 1 comments

What happened?

I tried to deploy a simple component chart pointing to an existing service:

    helm:
      chart:
        name: component-chart
        repo: https://charts.devspace.sh
      values:
        ingress:
          ingressClassName: nginx
          annotations:
            cert-manager.io/issue-temporary-certificate: 'true'
          rules:
            - host: db-admin.internal.${DOMAIN}
              path: /
              pathType: Prefix
              backend:
                service:
                  name: db-admin-${DEVSPACE_NAMESPACE}
                  port:
                    number: 8080
          tls: true
          tlsClusterIssuer: letsencrypt

Instead of a successful deployment, I receive the error:

error executing 'helm upgrade ingress --values /tmp/3388380188 --install --namespace withinboredom /home/withinboredom/.devspace/component-chart/component-chart-0.8.5.tgz --kube-context loft_withinboredom_loft-cluster': Error: UPGRADE FAILED: template: component-chart/templates/ingress.yaml:87:18: executing "component-chart/templates/ingress.yaml" at <index $.Values.service.ports 0>: error calling index: reflect: slice index out of range

When putting in a dummy service, the service name in my ingress is changed to reflect the name of that service instead of the one I set.

What did you expect to happen instead?

To be able to create an ingress to an arbitrary service.

How can we reproduce the bug? (as minimally and precisely as possible)

My devspace.yaml:

version: v2beta1
name: test
deployments:
  ingress:
    .... # see above

Local Environment:

  • DevSpace Version: [use devspace --version]
  • Operating System: windows | linux | mac
  • ARCH of the OS: AMD64 | ARM64 | i386 Kubernetes Cluster:
  • Cloud Provider: google | aws | azure | other
  • Kubernetes Version: [use kubectl version]

Anything else we need to know?

withinboredom avatar Nov 03 '22 12:11 withinboredom

@withinboredom thanks for the issue! Not sure that is actually inteded use for the DevSpace chart, but we'll take a look at this.

FabianKramm avatar Nov 03 '22 16:11 FabianKramm