Skip to content

Instantly share code, notes, and snippets.

@hulucc
Created October 11, 2020 09:45
Show Gist options
  • Save hulucc/1d453bcc0eef936dc2dce5960d20f7ec to your computer and use it in GitHub Desktop.
Save hulucc/1d453bcc0eef936dc2dce5960d20f7ec to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: udppress
namespace: default
spec:
selector:
matchLabels:
app: udppress
replicas: 1
revisionHistoryLimit: 0
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: udppress
spec:
restartPolicy: Always
containers:
- name: udppress
image: local/udppress:latest
imagePullPolicy: Never
command: ["/main", "server"]
# securityContext:
# allowPrivilegeEscalation: true
# capabilities:
# add: ["NET_ADMIN"]
readinessProbe:
exec:
command:
- /main
- health
initialDelaySeconds: 1
periodSeconds: 1
livenessProbe:
exec:
command:
- /main
- health
initialDelaySeconds: 5
periodSeconds: 1
lifecycle:
preStop:
exec:
command: ["/main", "stop"]
---
apiVersion: v1
kind: Service
metadata:
name: udppress
namespace: default
spec:
selector:
app: udppress
type: LoadBalancer
ports:
- port: 30000
targetPort: 30000
protocol: UDP
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment