Skip to content

Commit

Permalink
[Common] Update ingress rules and tls (#94)
Browse files Browse the repository at this point in the history
* Update ingress rules and tls
  • Loading branch information
lazam authored Jun 20, 2022
1 parent 98263b7 commit ef9dddf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 26 deletions.
2 changes: 1 addition & 1 deletion charts/common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: common
description: A generic helm chart for Kubernetes
type: application
version: 0.1.7
version: 0.2.0
maintainers:
- name: Parity
url: https://github.com/paritytech/helm-charts
31 changes: 6 additions & 25 deletions charts/common/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "common.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand All @@ -13,30 +12,12 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
{{- if .Values.ingress.tls }}
rules:
{{- with .Values.ingress.rules }}
{{- toYaml . | nindent 4 }}
{{- end }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- with .Values.ingress.tls }}
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit ef9dddf

Please sign in to comment.