Skip to content

Commit

Permalink
Adds Ingress support to kubetail chart
Browse files Browse the repository at this point in the history
* Adds optional ingress resource when `ingress.enabled=true`
* Accepts ingress configuration options
  • Loading branch information
nodesocket authored Feb 16, 2024
1 parent 248c430 commit 7f3ca5e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/kubetail/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ keywords:
- private
- realtime
type: application
version: 0.1.9
version: 0.2.0
appVersion: "0.1.3"
home: https://github.com/kubetail-org/kubetail
maintainers:
Expand Down
6 changes: 6 additions & 0 deletions charts/kubetail/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,10 @@ These are the configurable parameters for the kubetail chart and their default v
| service.type | string | Service type | ClusterIP |
| service.port | int | Service port | 4000 |
| serviceAccount.name | string | Override ServiceAccount name from release | |
| ingress.enabled | bool | Enable ingress resource | false |
| ingress.name | string | Override ingress name | |
| ingress.annotations | map | Annotations to apply to ingress resource | {} |
| ingress.hosts | array | Hosts array for ingress resource | |
| ingress.tls | array | TLS array for ingress resource | |
| ingress.secretName | string | Override ingress secretName | |
| config | map | Kubetail app config | *See values.yaml* |
37 changes: 37 additions & 0 deletions charts/kubetail/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{- $ing := index .Values "ingress" -}}
{{- if $ing.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ if .Values.ingress.name }}{{ .Values.ingress.name }}{{ else }}{{ include "kubetail.fullname" . }}{{ end }}
annotations:
{{- with .Values.ingress.annotations }}
{{ toYaml . | indent 4 }}
{{- end }}
spec:
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ if .Values.service.name }}{{ .Values.service.name }}{{ else }}{{ include "kubetail.fullname" . }}{{ end }}
port:
number: {{ .Values.service.port }}
{{- end }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{- range . }}
- hosts:
{{- range .hosts }}
- {{ . }}
{{- end }}
secretName: {{ if .Values.ingress.secretName }}{{ .Values.ingress.secretName }}{{ else }}{{ include "kubetail.fullname" . }}{{ end }}
{{- end }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/kubetail/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ service:
serviceAccount:
name:

# ingress options
ingress:
enabled: false
annotations: {}

# kubetail config (see https://github.com/kubetail-org/kubetail for defaults)
config:
csrf:
Expand Down

0 comments on commit 7f3ca5e

Please sign in to comment.