-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proxy: add ingress routes and rules for traefik
For now the proxy installation on kubernetes required disabling traefik and using metallb for the network part. This commit adds the IngressRouteTCP, IngressRouteUDP and Ingress resources to use with traefik.
- Loading branch information
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add ingress and routes for traefik |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: uyuni-proxy-ingress-nossl | ||
namespace: "{{ .Release.Namespace }}" | ||
annotations: | ||
{{- if eq .Values.ingress "nginx" }} | ||
nginx.ingress.kubernetes.io/ssl-redirect: "false" | ||
{{- else if eq .Values.ingress "traefik" }} | ||
traefik.ingress.kubernetes.io/router.tls: "false" | ||
traefik.ingress.kubernetes.io/router.entrypoints: "web" | ||
{{- end }} | ||
labels: | ||
app: uyuni-proxy | ||
spec: | ||
rules: | ||
- host: {{ .Values.fqdn }} | ||
http: | ||
paths: | ||
- backend: | ||
service: | ||
name: uyuni-proxy-tcp | ||
port: | ||
number: 80 | ||
path: / | ||
pathType: Prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{{- if eq .Values.ingress "traefik" }} | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRouteTCP | ||
metadata: | ||
name: ssl-router | ||
namespace: "{{ .Release.Namespace }}" | ||
spec: | ||
entryPoints: | ||
- websecure | ||
routes: | ||
- match: HostSNI(`*`) | ||
services: | ||
- name: uyuni-proxy-tcp | ||
port: 443 | ||
tls: | ||
passthrough: true | ||
--- | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRouteTCP | ||
metadata: | ||
name: ssh-router | ||
namespace: "{{ .Release.Namespace }}" | ||
spec: | ||
entryPoints: | ||
- ssh | ||
routes: | ||
- match: HostSNI(`*`) | ||
services: | ||
- name: uyuni-proxy-tcp | ||
port: 8022 | ||
--- | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRouteTCP | ||
metadata: | ||
name: salt-publish-router | ||
namespace: "{{ .Release.Namespace }}" | ||
spec: | ||
entryPoints: | ||
- salt-publish | ||
routes: | ||
- match: HostSNI(`*`) | ||
services: | ||
- name: uyuni-proxy-tcp | ||
port: 4505 | ||
--- | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRouteTCP | ||
metadata: | ||
name: salt-request-router | ||
namespace: "{{ .Release.Namespace }}" | ||
spec: | ||
entryPoints: | ||
- salt-request | ||
routes: | ||
- match: HostSNI(`*`) | ||
services: | ||
- name: uyuni-proxy-tcp | ||
port: 4506 | ||
--- | ||
apiVersion: traefik.containo.us/v1alpha1 | ||
kind: IngressRouteUDP | ||
metadata: | ||
name: tftp-router | ||
namespace: "{{ .Release.Namespace }}" | ||
spec: | ||
entryPoints: | ||
- tftp | ||
routes: | ||
- services: | ||
- name: uyuni-proxy-udp | ||
port: 69 | ||
{{- end }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters