-
Notifications
You must be signed in to change notification settings - Fork 299
/
artifactory.yml
87 lines (87 loc) · 2.25 KB
/
artifactory.yml
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
87
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: artifactory-k8s-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: artifactory-pro-k8s
group: artifactory-k8s-demo
spec:
securityContext:
runAsUser: 1030
fsGroup: 1030
initContainers:
- name: "remove-lost-found"
image: "alpine:3.9"
command:
- 'sh'
- '-c'
- 'rm -rfv /var/opt/jfrog/artifactory/lost+found'
volumeMounts:
- name: artifactory-pro-volume
mountPath: "/var/opt/jfrog/artifactory"
containers:
- name: artifactory-pro-k8s
image: docker.bintray.io/jfrog/artifactory-pro:6.23.13
env:
- name: DB_TYPE
value: postgresql
- name: DB_USER
value: artifactory
- name: DB_PASSWORD
value: password
- name: DB_HOST
value: postgresql-k8s-service
# Make sure to keep the memory java args aligned with the resources definitions
- name: EXTRA_JAVA_OPTIONS
value: "-Xms1g -Xmx2g"
ports:
- containerPort: 8081
volumeMounts:
- mountPath: "/var/opt/jfrog/artifactory"
name: artifactory-pro-volume
# Make sure to keep the resources set with values matching EXTRA_JAVA_OPTIONS above
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1"
readinessProbe:
httpGet:
path: '/artifactory/webapp/#/login'
port: 8081
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 10
livenessProbe:
httpGet:
path: '/artifactory/webapp/#/login'
port: 8081
initialDelaySeconds: 180
periodSeconds: 10
volumes:
- name: artifactory-pro-volume
persistentVolumeClaim:
claimName: artifactory-claim
imagePullSecrets:
- name: docker-reg-secret
---
apiVersion: v1
kind: Service
metadata:
name: artifactory
labels:
app: artifactory
group: artifactory-k8s-demo
spec:
type: NodePort
ports:
- port: 8081
protocol: TCP
selector:
app: artifactory-pro-k8s