This repository has been archived by the owner on Feb 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
/
Copy pathartifactory-deployment.yaml
59 lines (59 loc) · 2.12 KB
/
artifactory-deployment.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
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{ template "artifactory.fullname" . }}
labels:
app: {{ template "name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
component: "{{ .Values.artifactory.name }}"
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
spec:
replicas: {{ .Values.artReplicaCount }}
template:
metadata:
labels:
app: {{ template "name" . }}
component: "{{ .Values.artifactory.name }}"
release: {{ .Release.Name }}
annotations:
pod.beta.kubernetes.io/init-containers: '[{
"name": "remove-lost-found",
"image": {{ .Values.initContainerImage | quote }},
"command": ["rm", "-rf", "{{ .Values.artifactory.persistence.mountPath }}/lost+found"],
"volumeMounts": [{
"name": "artifactory-volume",
"mountPath": {{ .Values.artifactory.persistence.mountPath | quote }}
}],
"imagePullPolicy": {{ .Values.artifactory.image.pullPolicy | quote }}
}]'
spec:
containers:
- name: {{ .Values.artifactory.name }}
image: "{{ .Values.artifactory.image.repository }}:{{ .Values.artifactory.image.version }}"
imagePullPolicy: {{ .Values.artifactory.image.pullPolicy }}
env:
- name: DB_TYPE
value: {{ .Values.database.env.type }}
- name: DB_USER
value: {{ .Values.database.env.user }}
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: artifactory-database-password
- name: DB_HOST
value: {{ template "database.name" . }}
ports:
- containerPort: {{ .Values.artifactory.internalPort }}
volumeMounts:
- mountPath: {{ .Values.artifactory.persistence.mountPath | quote }}
name: artifactory-volume
volumes:
- name: artifactory-volume
{{- if .Values.artifactory.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ template "artifactory.fullname" . }}
{{- else }}
emptyDir: {}
{{- end -}}