Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set an explicit ingress class name #484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions kubernetes/chart/zulip/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Now you're ready to follow [the installation instructions above](#installation).
| ingress.hosts[0] | object | `{"host":"zulip.example.com","paths":[{"path":"/"}]}` | Host for the Ingress. Should be the same as `zulip.environment.SETTING_EXTERNAL_HOST`. |
| ingress.hosts[0].paths | list | `[{"path":"/"}]` | Serves Zulip root of the chosen host domain. |
| ingress.tls | list | `[]` | Set a specific secret to read the TLS certificate from. If you use cert-manager, it will save the TLS secret here. If you do not, you need to manually create a secret with your TLS certificate. |
| ingress.className | string | `""` | specify an explicit ingressClassName. |
| livenessProbe | object | `{"enabled":true,"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5}` | Liveness probe values. Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes |
| memcached | object | `{"memcachedUsername":"zulip@localhost"}` | Memcached settings, see [Requirements](#Requirements). |
| nameOverride | string | `""` | Partially override common.names.fullname template (will maintain the release name). |
Expand Down
3 changes: 3 additions & 0 deletions kubernetes/chart/zulip/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.className }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
Expand Down
2 changes: 2 additions & 0 deletions kubernetes/chart/zulip/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ ingress:
# - secretName: chart-example-tls
# hosts:
# - zulip.example.com
# set an explicit class name
className:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have a default value here, like "zulip"? I feel like probably that would be a reasonable default name for most deployments of this, but maybe I'm missing something about why someone would want something different, or potential breakage it could cause.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, in this context the class name is basically a label I attach to a specific ingress controller instance, if eg. my k8s cluster is on multiple networks and I need to place an ingress on a specific network. In simpler (and very common) setups, it is common to have a single ingress controller and an empty classname would select this one if you mark it as default see manual:

❯ k get ingressclasses.networking.k8s.io nginx -o yaml
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
  name: nginx
spec:
  controller: k8s.io/ingress-nginx

so a sane default could be to have it as an empty string, which produces the same design as the current chart, but one can configure it should a specific class is needed.
Take a random chart as an example: https://github.com/bitnami/charts/blob/main/bitnami/sonarqube/values.yaml#L611 (comment there is slightly misleading though)


resources:
{}
Expand Down