camunda-community-hub / camunda-7-community-helm

Camunda public Kubernetes Helm repo and charts
Apache License 2.0
39 stars 38 forks source link

Ingress: PathType is missing #42

Closed Sonny78 closed 1 year ago

Sonny78 commented 2 years ago

When I enable Ingress I get the following error:

missing required field \"pathType\"

I am running kubernetes on k3s and my kubernetes version is 'v1.23.4+k3s1'.

The version you resolve in the ingress rule is 'networking.k8s.io/v1'. See -> https://github.com/camunda-community-hub/camunda-helm/blob/main/charts/camunda-bpm-platform/templates/_helpers.tpl#L98

But this version seems to require the 'pathType' attribute https://github.com/camunda-community-hub/camunda-helm/blob/main/charts/camunda-bpm-platform/templates/ingress.yaml#L31

The Kubedashboard helm plugin for example sets the field to ImplementationSpecific and Portainer does it like this:

            {{- if eq $apiVersion "networking.k8s.io/v1" }}
            pathType: Prefix
            {{- end }}

Both solutions are fine for me. But you can also make this field available by a .Values configuration entry.

hostalp commented 1 year ago

The whole ingress resource config is very outdated. The generated config looks like:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: camunda-bpm-platform
  labels:
    helm.sh/chart: camunda-bpm-platform-7.6.2
    app.kubernetes.io/name: camunda-bpm-platform
    app.kubernetes.io/instance: camunda-bpm-platform
    app.kubernetes.io/version: "7.x.x"
    app.kubernetes.io/managed-by: Helm
spec:
  tls:
    - hosts:
        - camunda-hostname
      secretName: camunda-hostname-tls
  rules:
    - host: camunda-hostname
      http:
        paths:
          - path: /
            backend:
              serviceName: camunda-bpm-platform
              servicePort: 8080

But it should be something like:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: camunda-bpm-platform
  labels:
    helm.sh/chart: camunda-bpm-platform-7.6.2
    app.kubernetes.io/name: camunda-bpm-platform
    app.kubernetes.io/instance: camunda-bpm-platform
    app.kubernetes.io/version: "7.x.x"
    app.kubernetes.io/managed-by: Helm
spec:
  ingressClassName: nginx
  tls:
    - hosts:
        - camunda-hostname
      secretName: camunda-hostname-tls
  rules:
    - host: camunda-hostname
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: camunda-bpm-platform
                port:
                  number: 8080

E.g.