kubernetes / ingress-nginx

Ingress NGINX Controller for Kubernetes
https://kubernetes.github.io/ingress-nginx/
Apache License 2.0
17.35k stars 8.23k forks source link

Volume to default backend #6903

Closed holyhope closed 3 years ago

holyhope commented 3 years ago

Hello

I would like to mount volume into the default backend deployed with the helm chart.

This would allow me to mount secrets and configuration. This would also help to fix #6852 by letting user mounting custom static pages into the default backend.

I suggest to add following values to the chart:

defaultBackend:
  # ...

  extraVolumeMounts: []
  ## Additional volumeMounts to the default backend container.
  #  - name: copy-portal-skins
  #   mountPath: /var/lib/lemonldap-ng/portal/skins

  extraVolumes: []
  ## Additional volumes to the default backend pod.
  #  - name: copy-portal-skins
  #    emptyDir: {}

/kind feature

nodunnock commented 3 years ago

@holyhope any examples of mounting static pages into the default backend? inspecting the image k8s.gcr.io/defaultbackend-amd64 gives no clue how. It contains just a "server" binary as far as I can tell.

nodunnock commented 3 years ago

Nvm. I think I found the source of this default image and it seems it is not made to support mounting static pages. https://github.com/kubernetes/ingress-gce/tree/master/cmd/404-server