-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployment.yaml
More file actions
47 lines (47 loc) · 1.11 KB
/
deployment.yaml
File metadata and controls
47 lines (47 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Nginx with wait-for example
#
# This example deploys nginx that waits for a backend service
# to be reachable before starting.
#
# Usage:
# kubectl apply -f examples/nginx-waitfor/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-with-waitfor
labels:
app: nginx-with-waitfor
spec:
replicas: 1
selector:
matchLabels:
app: nginx-with-waitfor
template:
metadata:
labels:
app: nginx-with-waitfor
spec:
initContainers:
- name: wait-for-backend
image: ghcr.io/kitstream/initium:latest
args:
- wait-for
- --target
- tcp://backend-service:8080
- --timeout
- "120s"
- --max-attempts
- "30"
securityContext:
runAsNonRoot: true
runAsUser: 65534
readOnlyRootFilesystem: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
containers:
- name: nginx
image: nginx:1.27-alpine
ports:
- containerPort: 80