Browse Source

Use nginx ingress controller instead of haproxy

master
Fábio Kaiser Rauber 3 years ago
parent
commit
93ba8e4b7f
  1. 1
      charts/emailleg/v1.4.0/templates/correioadm-ingress.yaml
  2. 40
      charts/emailleg/v1.4.0/templates/imap-ingress.yaml
  3. 40
      charts/emailleg/v1.4.0/templates/pop-ingress.yaml
  4. 40
      charts/emailleg/v1.4.0/templates/smtp-ingress.yaml

1
charts/emailleg/v1.4.0/templates/correioadm-ingress.yaml

@ -13,7 +13,6 @@ metadata:
{{- include "emailleg.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
kubernetes.io/ingress.class: haproxy
spec:
tls:
- hosts:

40
charts/emailleg/v1.4.0/templates/imap-ingress.yaml

@ -1,40 +0,0 @@
{{- $fullName := include "emailleg.fullname" . -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ .Release.Name }}-imap
labels:
{{- include "emailleg.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/tcp-service-port: "993"
kubernetes.io/ingress.class: haproxy
spec:
tls:
- hosts:
- "imap.{{ .Values.mail.domain }}"
secretName: {{ .Release.Name }}-imap-crt
rules:
- host: "imap.{{ .Values.mail.domain }}"
http:
paths:
- path: {{ .path }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ .Release.Name }}-mail
port:
number: 143
{{- else }}
serviceName: {{ .Release.Name }}-mail
servicePort: imap
{{- end }}

40
charts/emailleg/v1.4.0/templates/pop-ingress.yaml

@ -1,40 +0,0 @@
{{- $fullName := include "emailleg.fullname" . -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ .Release.Name }}-pop
labels:
{{- include "emailleg.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/tcp-service-port: "995"
kubernetes.io/ingress.class: haproxy
spec:
tls:
- hosts:
- "pop.{{ .Values.mail.domain }}"
secretName: {{ .Release.Name }}-pop-crt
rules:
- host: "pop.{{ .Values.mail.domain }}"
http:
paths:
- path: {{ .path }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ .Release.Name }}-mail
port:
number: 110
{{- else }}
serviceName: {{ .Release.Name }}-mail
servicePort: pop
{{- end }}

40
charts/emailleg/v1.4.0/templates/smtp-ingress.yaml

@ -1,40 +0,0 @@
{{- $fullName := include "emailleg.fullname" . -}}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ .Release.Name }}-smtp
labels:
{{- include "emailleg.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
ingress.kubernetes.io/tcp-service-port: "587"
kubernetes.io/ingress.class: haproxy
spec:
tls:
- hosts:
- "smtp.{{ .Values.mail.domain }}"
secretName: {{ .Release.Name }}-smtp-crt
rules:
- host: "smtp.{{ .Values.mail.domain }}"
http:
paths:
- path: {{ .path }}
{{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }}
pathType: ImplementationSpecific
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ .Release.Name }}-mail
port:
number: 25
{{- else }}
serviceName: {{ .Release.Name }}-mail
servicePort: smtp
{{- end }}
Loading…
Cancel
Save