immich-app / immich-charts

Helm chart implementation of Immich
https://immich.app
GNU Affero General Public License v3.0
110 stars 48 forks source link

Can't Set ingressClassName In the Charts #116

Closed MoustafaAMahmoud closed 2 weeks ago

MoustafaAMahmoud commented 2 weeks ago

Hello,

Thanks for your work on this helm. I have a minor issue.

When i tried to install the helm. I have to manual edit to set the ingressClassName to nginx to work with me.

spec:
  ingressClassName: nginx

This is my values example:

    values: |-
      server:
        ingress:
          main:
            enabled: true
            className: nginx  #can't read this automatically   
            annotations:
              cert-manager.io/cluster-issuer: letsencrypt-production
              nginx.ingress.kubernetes.io/proxy-body-size: "30G"
              nginx.ingress.kubernetes.io/proxy-connect-timeout: "3600"
              nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
              nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
            hosts:
              - host: domain.com  # Replace with your actual domain
                paths:
                  - path: "/"
                    pathType: ImplementationSpecific
            tls:
              - hosts:
                  - domain.com  # Match this with the domain in the hosts section
                secretName: letsencrypt-production  # Replace with your actual TLS secret name

I run

kubectl edit ingress immich-server -n media

Then updated the below

spec:
  ingressClassName: nginx
  rules:

I am not expert, but my recommendation is to add the below in the ingress template

spec:
  {{- with
.Values.ingress.className
}}
  ingressClassName: {{ . }}
  {{- end }}
bo0tzz commented 2 weeks ago

The value to set is

server:
  ingress:
    main:
      ingressClassName: nginx

See https://github.com/bjw-s/helm-charts/blob/923ef40a39520979c98f354ea23963ee54f54433/charts/library/common/values.yaml#L407