-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathk8s.yaml
86 lines (86 loc) · 1.84 KB
/
k8s.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: bigbucket
labels:
app: bigbucket
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: bigbucket
template:
metadata:
labels:
app: bigbucket
spec:
containers:
- name: bigbucket
image: ghcr.io/adrianchifor/bigbucket:latest
imagePullPolicy: Always
env:
- name: BUCKET
value: gs://your-bucket
resources:
requests:
cpu: 50m
memory: 128Mi
ports:
- containerPort: 8080
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 3
readinessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 5
periodSeconds: 30
---
apiVersion: v1
kind: Service
metadata:
name: bigbucket
spec:
selector:
app: bigbucket
ports:
- protocol: TCP
port: 8080
targetPort: 8080
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: bigbucket-cleaner
labels:
app: bigbucket-cleaner
spec:
schedule: "0 * * * *"
concurrencyPolicy: "Forbid"
successfulJobsHistoryLimit: 2
startingDeadlineSeconds: 60
jobTemplate:
spec:
template:
metadata:
labels:
app: bigbucket-cleaner
spec:
restartPolicy: Never
containers:
- name: bigbucket-cleaner
image: ghcr.io/adrianchifor/bigbucket:latest
imagePullPolicy: Always
env:
- name: BUCKET
value: gs://your-bucket
- name: CLEANER
value: "true"
resources:
requests:
cpu: 50m
memory: 128Mi