Skip to content

Commit

Permalink
[fluentd] Add Ingress. (#281)
Browse files Browse the repository at this point in the history
* Add Ingress resource to fluentd for Deployment/StatefulSet options.

Signed-off-by: Paulo E. Castro <[email protected]>
  • Loading branch information
pecastro authored Nov 15, 2023
1 parent 2ffb2ed commit b0f13f5
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/fluentd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: fluentd
description: A Helm chart for Kubernetes
# type: application
version: 0.4.5
version: 0.5.0
appVersion: v1.16.2
icon: https://www.fluentd.org/images/miscellany/fluentd-logo_2x.png
home: https://www.fluentd.org/
Expand Down
44 changes: 44 additions & 0 deletions charts/fluentd/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "fluentd.fullname" . -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "fluentd.fullname" . }}
labels:
{{- include "fluentd.labels" . | nindent 4 }}
{{- with .Values.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
{{- with .secretName }}
secretName: {{ . }}
{{- end }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ $fullName }}
port:
number: {{ .port }}
{{ if .host -}}
host: {{ .host | quote }}
{{- end -}}
{{- end -}}
{{- end -}}
14 changes: 14 additions & 0 deletions charts/fluentd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -377,3 +377,17 @@ fileConfigs:
password changeme
</match>
</label>
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
# - host: fluentd.example.tld
- port: 9880

tls: []
# - secretName: fluentd-tls
# hosts:
# - fluentd.example.tld

0 comments on commit b0f13f5

Please sign in to comment.