Files
2026-09-09 23:15:49 +02:00

88 lines
1.8 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: tcp-echo-a
namespace: tcp-echo
labels:
app: tcp-echo
instance: a
spec:
replicas: 1
selector:
matchLabels:
app: tcp-echo
instance: a
template:
metadata:
labels:
app: tcp-echo
instance: a
spec:
containers:
- name: tcp-echo
image: gitea.eitczech.com/public/tcp-echo-server:latest
imagePullPolicy: Always
env:
- name: PORT
value: "9098"
- name: INSTANCE_ID
value: "echo-a"
ports:
- name: tcp
containerPort: 9098
protocol: TCP
readinessProbe:
tcpSocket:
port: tcp
initialDelaySeconds: 2
periodSeconds: 5
livenessProbe:
tcpSocket:
port: tcp
initialDelaySeconds: 5
periodSeconds: 10
resources:
requests:
cpu: 20m
memory: 32Mi
limits:
cpu: 200m
memory: 128Mi
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: true
runAsUser: 1654
runAsGroup: 1654
capabilities:
drop: ["ALL"]
---
apiVersion: v1
kind: Service
metadata:
name: tcp-echo-a
namespace: tcp-echo
spec:
type: ClusterIP
selector:
app: tcp-echo
instance: a
ports:
- name: tcp
port: 9098
targetPort: tcp
protocol: TCP
---
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: tcp-echo-a
namespace: tcp-echo
spec:
entryPoints:
- tcpechoa
routes:
- match: HostSNI(`*`)
services:
- name: tcp-echo-a
port: 9098