ingress revision
All checks were successful
/ continuous-deploy (push) Successful in 20s

This commit is contained in:
Márcio Fernandes
2026-04-09 12:34:45 +00:00
parent d19eb21529
commit 0599b3d41a
7 changed files with 48 additions and 31 deletions

View File

@@ -152,10 +152,9 @@ persistence:
service: service:
ssh: ssh:
type: LoadBalancer clusterIP: "" # empty string → Kubernetes assigns a routable ClusterIP
enabled: true type: ClusterIP
port: 2222 port: 2222
externalTrafficPolicy: Local
http: http:
clusterIP: "" # empty string → Kubernetes assigns a routable ClusterIP clusterIP: "" # empty string → Kubernetes assigns a routable ClusterIP
type: ClusterIP type: ClusterIP

View File

@@ -0,0 +1,14 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: ssh-public
annotations:
kubernetes.io/ingress.class: traefik-public
spec:
entryPoints:
- tcp2222
routes:
- match: HostSNI(`*`)
services:
- name: gitea-ssh
port: 2222

View File

@@ -0,0 +1,14 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: ssh
annotations:
kubernetes.io/ingress.class: traefik
spec:
entryPoints:
- tcp2222
routes:
- match: HostSNI(`*`)
services:
- name: gitea-ssh
port: 2222

View File

@@ -1,10 +1,12 @@
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: IngressRoute kind: IngressRoute
metadata: metadata:
name: public-https name: web-public
annotations:
kubernetes.io/ingress.class: traefik-public
spec: spec:
entryPoints: entryPoints:
- public-https - websecure
routes: routes:
- match: Host(`git.limbosolutions.com`) && !PathPrefix(`/-/admin`) - match: Host(`git.limbosolutions.com`) && !PathPrefix(`/-/admin`)
kind: Rule kind: Rule

View File

@@ -1,7 +1,9 @@
apiVersion: traefik.io/v1alpha1 apiVersion: traefik.io/v1alpha1
kind: IngressRoute kind: IngressRoute
metadata: metadata:
name: websecure name: web
annotations:
kubernetes.io/ingress.class: traefik
spec: spec:
entryPoints: entryPoints:
- websecure - websecure

View File

@@ -5,8 +5,10 @@ resources:
- cd-serviceaccount.yaml - cd-serviceaccount.yaml
- network-policies.yaml - network-policies.yaml
- certificate.yaml - certificate.yaml
- websecure-ingress-route.yaml - ingress-web.yaml
- public-https-ingress-route.yaml - ingress-web-public.yaml
- ingress-ssh.yaml
- ingress-ssh-public.yaml
generatorOptions: generatorOptions:
disableNameSuffixHash: true disableNameSuffixHash: true

View File

@@ -14,29 +14,10 @@ spec:
--- ---
apiVersion: cilium.io/v2 apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy kind: CiliumNetworkPolicy
metadata: metadata:
name: allow-ssh-to-gitea name: allow-traefik-ingress
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: gitea
ingress:
- fromCIDRSet:
- cidr: 0.0.0.0/0
toPorts:
- ports:
- port: "2222"
protocol: TCP
---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: allow-gitea-ingress
spec: spec:
endpointSelector: endpointSelector:
matchLabels: matchLabels:
@@ -44,7 +25,7 @@ spec:
ingress: ingress:
# ------------------------------------------------------------- # -------------------------------------------------------------
# Allow Traefik (in kube-system) to reach Gitea on port 3000 # Allow Traefik (in kube-system) to reach Gitea on port 3000 and 2222
# ------------------------------------------------------------- # -------------------------------------------------------------
- fromEndpoints: - fromEndpoints:
- matchLabels: - matchLabels:
@@ -53,9 +34,12 @@ spec:
- key: k8s:io.kubernetes.pod.namespace - key: k8s:io.kubernetes.pod.namespace
operator: In operator: In
values: values:
- kube-system - traefik
- traefik-public
toPorts: toPorts:
- ports: - ports:
- port: "3000" - port: "3000"
protocol: TCP protocol: TCP
- ports:
- port: "2222"
protocol: TCP