mirror of
https://code.forgejo.org/infrastructure/documentation
synced 2024-11-26 04:21:10 +00:00
use traefik as a reverse proxy for ssh too
It is more uniform. It also allows to set externalTrafficPolicy: Local with the benefit of logging the ip of the incoming connection.
This commit is contained in:
parent
de28b83d38
commit
0ee041fb98
|
@ -5,18 +5,23 @@ metadata:
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
spec:
|
spec:
|
||||||
valuesContent: |-
|
valuesContent: |-
|
||||||
|
deployment:
|
||||||
|
replicas: 2
|
||||||
ports:
|
ports:
|
||||||
web:
|
web:
|
||||||
port: 80
|
port: 80
|
||||||
redirectTo:
|
redirectTo:
|
||||||
port: websecure
|
port: websecure
|
||||||
priority: 1
|
priority: 1
|
||||||
deployment:
|
ssh-next:
|
||||||
replicas: 2
|
port: 2020
|
||||||
|
exposedPort: 2020
|
||||||
|
expose: true
|
||||||
service:
|
service:
|
||||||
annotations:
|
annotations:
|
||||||
metallb.universe.tf/allow-shared-ip: "key-to-share-failover"
|
|
||||||
metallb.universe.tf/loadBalancerIPs: $failover_ipv4,$failover_ipv6
|
metallb.universe.tf/loadBalancerIPs: $failover_ipv4,$failover_ipv6
|
||||||
|
spec:
|
||||||
|
externalTrafficPolicy: Local
|
||||||
logs:
|
logs:
|
||||||
access:
|
access:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
|
@ -16,12 +16,11 @@ service:
|
||||||
http:
|
http:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
ipFamilyPolicy: PreferDualStack
|
ipFamilyPolicy: PreferDualStack
|
||||||
|
clusterIP: ~
|
||||||
port: 3000
|
port: 3000
|
||||||
ssh:
|
ssh:
|
||||||
type: LoadBalancer
|
type: ClusterIP
|
||||||
annotations:
|
clusterIP: ~
|
||||||
metallb.universe.tf/loadBalancerIPs: $failover_ipv4,$failover_ipv6
|
|
||||||
metallb.universe.tf/allow-shared-ip: "key-to-share-failover"
|
|
||||||
ipFamilyPolicy: PreferDualStack
|
ipFamilyPolicy: PreferDualStack
|
||||||
|
|
||||||
redis-cluster:
|
redis-cluster:
|
||||||
|
|
|
@ -17,7 +17,24 @@ ingress:
|
||||||
|
|
||||||
service:
|
service:
|
||||||
ssh:
|
ssh:
|
||||||
port: 2020
|
port: 2222
|
||||||
|
|
||||||
|
extraDeploy:
|
||||||
|
# Route from traefik to forgejo
|
||||||
|
- apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRouteTCP
|
||||||
|
metadata:
|
||||||
|
name: forgejo-next-ssh
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- ssh-next # name from traefik port
|
||||||
|
routes:
|
||||||
|
- match: HostSNI(`*`)
|
||||||
|
services:
|
||||||
|
- name: forgejo-next-ssh
|
||||||
|
port: 2222 # forgejo ssh port on kubernetes service
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
claimName: forgejo-next
|
claimName: forgejo-next
|
||||||
|
|
Loading…
Reference in a new issue