Skip to content

Commit

Permalink
Merge pull request #52 from UnstoppableMango/paths
Browse files Browse the repository at this point in the history
Support changing paths on the ingress
  • Loading branch information
ressu authored Jan 14, 2024
2 parents 3251a94 + 9b26df5 commit 799972a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
6 changes: 4 additions & 2 deletions charts/kube-plex/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ The following tables lists the configurable parameters of the Plex chart and the
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.labels` | Custom labels | `{}` |
| `ingress.ingressClass` | Ingress class | `nil` |
| `ingress.path` | Ingress path | `/` |
| `ingress.hosts` | Ingress accepted hostnames | `chart-example.local` |
| `ingress.hosts` | Ingress accepted hostnames | `[]` |
| `ingress.hosts[].host` | Ingress accepted hostname | `chart-example.local` |
| `ingress.hosts[].path` | Ingress path | `/` |
| `ingress.hosts[].pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| `rbac.create` | Create RBAC roles? | `true` |
| `nodeSelector` | Node labels for pod assignment | `kubernetes.io/arch: amd64` |
Expand Down
13 changes: 11 additions & 2 deletions charts/kube-plex/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ spec:
{{- end }}
rules:
{{- range $host := .Values.ingress.hosts }}
{{- if kindIs "string" $host }}
- host: {{ $host }}
{{- else }}
- host: {{ $host.host }}
{{- end }}
http:
paths:
- path: /
pathType: ImplementationSpecific
{{- if kindIs "string" $host }}
- path: "/"
pathType: "ImplementationSpecific"
{{- else }}
- path: {{ $host.path | default "/" }}
pathType: {{ $host.pathType | default "ImplementationSpecific" }}
{{- end }}
backend:
service:
name: {{ $serviceName }}
Expand Down
5 changes: 4 additions & 1 deletion charts/kube-plex/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ ingress:
# To use a non-default ingress class uncomment the line below
# ingressClass: myClass
# Used to create an Ingress record.
# For backwards compatibility, a string array of hosts is also allowed i.e. `hosts: ['chart-example.local']`
hosts:
- chart-example.local
- host: chart-example.local
# path: /
# pathType: ImplementationSpecific
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
Expand Down

0 comments on commit 799972a

Please sign in to comment.