Skip to content

Commit

Permalink
Merge pull request #49 from Chia-Network/ingress-style
Browse files Browse the repository at this point in the history
Add optional ingress style switch to generic chart
  • Loading branch information
Starttoaster authored Jun 11, 2024
2 parents 2ebe414 + 0c8e332 commit 833bc08
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apiVersion: v2
name: generic
description: A generic helm chart that handles a bunch of common application deploy cases
type: application
version: 1.9.0
version: 1.10.0
10 changes: 10 additions & 0 deletions charts/generic/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ spec:
{{- range .Values.ingress.hosts }}
- {{ .host | quote }}
{{- end }}
{{- if .Values.ingress.tlsSecretEnabled }}
secretName: "{{ .Values.ingress.tlsSecretName | default (printf "%s-tls" .Release.Name) }}"
{{- end }}
{{- end }}
{{- if eq $.Values.ingress.ruleType "rules" }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
Expand All @@ -56,4 +59,11 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- else if eq $.Values.ingress.ruleType "defaultBackend" }}
defaultBackend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
5 changes: 5 additions & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ ingress:
# Uncomment the following to use a pre-generated TLS Secret
# tlsSecretName: ""

# Set to false if TLS is enabled, but you're using an ingress class that doesn't support TLS cert secrets
tlsSecretEnabled: true
# Switch between different Ingress rule styles. Can be one of "rules", or "defaultBackend"
ruleType: "rules"

networkPolicy:
enabled: false
policyTypes: []
Expand Down

0 comments on commit 833bc08

Please sign in to comment.