-
Notifications
You must be signed in to change notification settings - Fork 0
/
magento2-deployment.yaml
105 lines (105 loc) · 4.66 KB
/
magento2-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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "magento.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "magento.name" . }}
helm.sh/chart: {{ include "magento.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "magento.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
strategy:
type: Recreate
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "magento.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
containers:
- name: {{ .Chart.Name }}
image: magento2-monolith:dev
imagePullPolicy: Never
securityContext:
privileged: true
ports:
- containerPort: {{ .Values.global.monolith.service.port }}
volumeMounts:
- name: code
mountPath: {{.Values.global.monolith.volumeHostPath}}
env:
- name: DEVBOX_ROOT
value: {{.Values.global.monolith.volumeHostPath}}
- name: COMPOSER_HOME
value: {{.Values.global.monolith.volumeHostPath}}/.composer
- name: MAGENTO_ROOT
value: {{.Values.global.monolith.volumeHostPath}}/magento
- name: MAGENTO_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}/magento
- name: DEVBOX_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}
- name: IS_WINDOWS_HOST
value: "0"
- name: {{ .Chart.Name }}-xdebug
image: magento2-monolith:dev-xdebug
imagePullPolicy: Never
securityContext:
privileged: true
ports:
- containerPort: {{ .Values.xdebugService.port }}
volumeMounts:
- name: code
mountPath: {{.Values.global.monolith.volumeHostPath}}
env:
- name: DEVBOX_ROOT
value: {{.Values.global.monolith.volumeHostPath}}
- name: COMPOSER_HOME
value: {{.Values.global.monolith.volumeHostPath}}/.composer
- name: MAGENTO_ROOT
value: {{.Values.global.monolith.volumeHostPath}}/magento
- name: MAGENTO_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}/magento
- name: DEVBOX_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}
- name: IS_WINDOWS_HOST
value: "0"
- name: nginx
image: nginx:1.9
securityContext:
privileged: true
volumeMounts:
- name: code
mountPath: {{.Values.global.monolith.volumeHostPath}}
- name: nginx-config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
- name: varnish
image: million12/varnish
env:
- name: VCL_CONFIG
value: /etc/varnish/magento.vcl
- name: VARNISHD_PARAMS
value: "-a 0.0.0.0:{{ .Values.global.monolith.service.varnishPort }}"
volumeMounts:
- name: varnish-config-volume
mountPath: /etc/varnish/magento.vcl
subPath: varnish.vcl
volumes:
- name: nginx-config-volume
configMap:
name: {{ template "magento.fullname" . }}-nginx-config
- name: varnish-config-volume
configMap:
name: {{ template "magento.fullname" . }}-varnish-config
- name: code
{{- if .Values.global.persistence.nfs.enabled }}
persistentVolumeClaim:
claimName: {{ include "magento.fullname" . }}-claim
{{- else }}
hostPath:
path: {{.Values.global.monolith.volumeHostPath}}
{{- end }}