94 lines
2.2 KiB
YAML
94 lines
2.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gingress-controller
|
|
namespace: gingress-system
|
|
labels:
|
|
app: gingress
|
|
spec:
|
|
replicas: 2
|
|
selector:
|
|
matchLabels:
|
|
app: gingress
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gingress
|
|
spec:
|
|
serviceAccountName: gingress-controller
|
|
containers:
|
|
- name: gingress
|
|
image: gingress:latest
|
|
imagePullPolicy: IfNotPresent
|
|
args:
|
|
- "--ingress-class=gingress"
|
|
- "--bind-http=0.0.0.0:80"
|
|
- "--bind-https=0.0.0.0:443"
|
|
- "--metrics-bind=0.0.0.0:8080"
|
|
ports:
|
|
- name: http
|
|
containerPort: 80
|
|
protocol: TCP
|
|
- name: https
|
|
containerPort: 443
|
|
protocol: TCP
|
|
- name: metrics
|
|
containerPort: 8080
|
|
protocol: TCP
|
|
env:
|
|
- name: RUST_LOG
|
|
value: "info"
|
|
- name: METRICS_PUSH_URL
|
|
value: "" # Optional: push to metrics aggregator
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /readyz
|
|
port: 8080
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 5
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
affinity:
|
|
podAntiAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
podAffinityTerm:
|
|
labelSelector:
|
|
matchLabels:
|
|
app: gingress
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gingress
|
|
namespace: gingress-system
|
|
spec:
|
|
type: LoadBalancer
|
|
selector:
|
|
app: gingress
|
|
ports:
|
|
- name: http
|
|
port: 80
|
|
targetPort: 80
|
|
protocol: TCP
|
|
- name: https
|
|
port: 443
|
|
targetPort: 443
|
|
protocol: TCP
|
|
- name: metrics
|
|
port: 8080
|
|
targetPort: 8080
|
|
protocol: TCP
|