1 Star 0 Fork 0

eristin/magento2-kubernetes-devbox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
magento2-deployment.yaml 5.11 KB
一键复制 编辑 原始数据 按行查看 历史
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 }}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xkxuetang/magento2-kubernetes-devbox.git
git@gitee.com:xkxuetang/magento2-kubernetes-devbox.git
xkxuetang
magento2-kubernetes-devbox
magento2-kubernetes-devbox
master

搜索帮助