-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathk8s-tiny-tools-with-swaks.yaml
57 lines (56 loc) · 1.5 KB
/
k8s-tiny-tools-with-swaks.yaml
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
48
49
50
51
52
53
54
55
56
# https://raw.githubusercontent.com/fabianlee/tiny-tools-with-swaks/main/k8s-tiny-tools-with-swaks.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tiny-tools-with-swaks
# allow for override: kubectl -n <ns> apply ...
#namespace: default
labels:
app: tiny-tools-with-swaks
spec:
selector:
matchLabels:
app: tiny-tools-with-swaks
# kubectl scale --replicas=x deployment/tiny-tools
replicas: 1
template:
metadata:
labels:
app: tiny-tools-with-swaks
# avoid istio envy project if being auto-injected
annotations:
sidecar.istio.io/inject: "false"
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- tiny-tools-with-swaks
topologyKey: "kubernetes.io/hostname"
containers:
- name: tiny-tools-with-swaks
image: fabianlee/tiny-tools-with-swaks:3.12.001
args:
- /bin/sh
- -c
- touch /tmp/healthy; date; echo "starting..."; sleep 30d
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
restartPolicy: Always