-
Notifications
You must be signed in to change notification settings - Fork 299
/
artifactory-ha-node2.yml
74 lines (74 loc) · 2.21 KB
/
artifactory-ha-node2.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: artifactory-ha-node2
spec:
replicas: 1
template:
metadata:
labels:
app: artifactory-ha
group: artifactory-k8s-demo
spec:
containers:
- name: artifactory-ha-node2
# Set your actual artifactory-pro image
image: <your-docker-reg>/jfrog/artifactory-pro-mysql:6.23.13
env:
- name: DB_TYPE
value: mysql
- name: DB_USER
value: artifactory
- name: DB_PASSWORD
value: password
- name: DB_HOST
value: mysql-k8s-service
- name: HA_IS_PRIMARY
value: "false"
- name: HA_NODE_ID
value: ha-node2
- name: HA_MEMBERSHIP_PORT
value: "10117"
- name: ARTIFACTORY_MASTER_KEY
value: "fc9dfbbfb055f18c765ed19e63ad41a9e1fda67bdb6a24ebfb2aeb6aa6349549"
# Make sure to keep the memory java args aligned with the resources definitions
- name: EXTRA_JAVA_OPTIONS
value: "-Xms1g -Xmx2g"
ports:
- containerPort: 8081
volumeMounts:
- name: artifactory-node2-volume
mountPath: "/var/opt/jfrog/artifactory"
- name: binarystore-xml
mountPath: "/var/opt/jfrog/artifactory/etc/binarystore.xml"
subPath: binarystore.xml
# 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-node2-volume
persistentVolumeClaim:
claimName: artifactory-node2-claim
- name: binarystore-xml
configMap:
name: artifactory-binarystore
imagePullSecrets:
- name: docker-reg-secret