This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
magento2-deployment.yaml
115 lines (115 loc) · 5.11 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
106
107
108
109
110
111
112
113
114
115
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 }}
ssh.access: php
spec:
hostAliases:
- ip: {{ .Values.global.dns.magentoHosts.ip }}
hostnames: {{ .Values.global.dns.magentoHosts.hostnames }}
containers:
- name: {{ .Chart.Name }}
image: magento2-monolith:dev
imagePullPolicy: Never
securityContext:
privileged: true
ports:
- containerPort: {{ .Values.global.monolith.service.phpFpmPort }}
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: DEVBOX_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}
- name: {{ .Chart.Name }}-xdebug
image: magento2-monolith:dev-xdebug
imagePullPolicy: Never
securityContext:
privileged: true
ports:
- containerPort: {{ .Values.global.monolith.service.phpFpmXdebugPort }}
{{/*- containerPort: 22*/}}
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: DEVBOX_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}
- name: {{ .Chart.Name }}-xdebug-cli-over-ssh
image: magento2-monolith:dev-xdebug-and-ssh
imagePullPolicy: Never
securityContext:
privileged: true
ports:
- containerPort: 22
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: DEVBOX_ROOT_HOST
value: {{.Values.global.monolith.volumeHostPath}}
- 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 }}