4 Commits

4 changed files with 67 additions and 27 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
*.swp
*.tar.gz

View File

@@ -1,2 +1,4 @@
# mailman3-helm-chart # mailman3-helm-chart
Helm chart for Mailman3 deployment Helm chart for Mailman3 deployment
Fork of [fw8/mailman3-helm-chart](https://github.com/fw8/mailman3-helm-chart).

View File

@@ -1,33 +1,63 @@
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "mailman3.fullname" . -}} {{- $fullName := include "mailman3.fullname" . -}}
{{- $svcPort := .Values.service.port -}} {{- $httpPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} apiVersion: networking.k8s.io/v1
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress kind: Ingress
metadata: metadata:
name: {{ $fullName }} name: {{ $fullName }}
namespace: {{ .Values.namespace | default .Release.Namespace }}
labels: labels:
{{- include "mailman3.labels" . | nindent 4 }} {{- include "mailman3.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations: annotations:
{{- toYaml . | nindent 4 }} {{- range $key, $value := .Values.ingress.annotations }}
{{- end }} {{ $key }}: {{ $value | quote }}
{{- end }}
spec: spec:
{{- if .Values.ingress.tls }} ingressClassName: {{ tpl .Values.ingress.className . }}
{{- if .Values.ingress.tls }}
tls: tls:
{{- range .Values.ingress.tls }}
- hosts: - hosts:
- {{ .Values.hostname }} {{- range .hosts }}
secretName: {{ include "mailman3.fullname" . }}-certificate - {{ tpl . $ | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }} {{- end }}
rules:
- host: {{ .Values.hostname | quote }}
http:
paths:
- path: /
backend:
serviceName: {{ include "mailman3.fullname" . }}-web
servicePort: 80
{{- end }} {{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ tpl .host $ | quote }}
http:
paths:
{{- if .paths }}
{{- range .paths }}
{{- if kindIs "string" . }}
- path: {{ . }}
pathType: {{ default "Prefix" $.Values.ingress.pathType }}
backend:
service:
name: {{ $fullName }}-web
port:
number: {{ $httpPort }}
{{- else }}
- path: {{ .path | default "/" }}
pathType: {{ .pathType | default "Prefix" }}
backend:
service:
name: {{ $fullName }}-web
port:
number: {{ $httpPort }}
{{- end }}
{{- end }}
{{- else }}
- path: "/"
pathType: "Prefix"
backend:
service:
name: {{ $fullName }}-web
port:
number: {{ $httpPort }}
{{- end }}
{{- end }}
{{- end }}

View File

@@ -12,7 +12,7 @@
#hyperkittyApiKey: supersecret #hyperkittyApiKey: supersecret
#djangoSecretKey: supersecret #djangoSecretKey: supersecret
hostname: lists.example.org hostname: lists.example.com
imagePullSecrets: [] imagePullSecrets: []
nameOverride: "" nameOverride: ""
@@ -67,12 +67,18 @@ web:
service: service:
type: ClusterIP type: ClusterIP
port: 80
ingress: ingress:
enabled: false enabled: false
tls: false className: ""
annotations: pathType: Prefix
# use NGINX Ingress Controller annotations: {}
#kubernetes.io/ingress.class: "nginx" hosts:
# use Cert-Manager for LetsEncrypt Certificates - host: lists.example.com
#cert-manager.io/issuer: "letsencrypt-prod" paths:
- path: /
tls: []
# - secretName: chart-example-tls
# hosts:
# - git.example.com