Release version 1.0.0
This commit is contained in:
@@ -13,119 +13,170 @@ spec:
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | lower | trunc 63 }}
|
||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
||||
{{- include "..selector-labels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
cloudyne.systems/customer: {{ .Values.customer.legalName | replace " " "-" | lower | trunc 63 }}
|
||||
cloudyne.systems/customer-legal-id: {{ .Values.customer.legalId }}
|
||||
cloudyne.systems/site: {{ .Values.site.domain }}
|
||||
{{- include "..selector-labels" . | nindent 8 }}
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 101
|
||||
volumes:
|
||||
- name: cloud
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{ include "..fullname" . }}
|
||||
- name: cloud-local
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{ include "..fullname" . }}-local
|
||||
- name: serverconfig
|
||||
configMap:
|
||||
name: {{ include "..fullname" . }}-cfg
|
||||
{{- if and .Values.secrets .Values.secrets.external }}
|
||||
{{- range .Values.secrets.external }}
|
||||
{{- if eq .type "file" }}
|
||||
- name: {{ .name }}
|
||||
secret:
|
||||
secretName: {{- include "..fullname" $ }}-exts-{{ .name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.kubernetes }}
|
||||
{{- range .Values.storage.kubernetes }}
|
||||
- name: {{ .name }}
|
||||
{{- if eq .type "secret" }}
|
||||
secret:
|
||||
secretName: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- if eq .type "configmap" }}
|
||||
configMap:
|
||||
name: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
- name: cloud
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{- include "..name" . }}-cloud
|
||||
{{- end }}
|
||||
{{- if .Values.storage.local.active }}
|
||||
- name: local
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{- include "..name" . }}-local
|
||||
{{- end }}
|
||||
{{- if and .Values.secrets .Values.secrets.external }}
|
||||
{{- range .Values.secrets.external }}
|
||||
{{- if eq .type "docker" }}
|
||||
imagePullSecrets:
|
||||
- name: pull-secret
|
||||
- name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.kubernetes }}
|
||||
{{- range .Values.storage.kubernetes }}
|
||||
{{- if eq .type "docker" }}
|
||||
imagePullSecrets:
|
||||
- name: "{{- include "..fullname" $ }}-sec-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
initContainers:
|
||||
- name: init-storage
|
||||
{{- if and .Values.storage.cloud.active .Values.storage.local.active }}
|
||||
- name: init-local-storage
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsUser: 0
|
||||
image: cloudyne/ubuntu-ci:latest
|
||||
command: ["python3"]
|
||||
args: ["/usr/local/bin/storage-clone", "/full-cloud", "/full-cloud-local"]
|
||||
args: ["/usr/local/bin/storage-clone", "/mnt/cloud", "/mnt/local"]
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: cloud
|
||||
mountPath: /full-cloud
|
||||
- name: cloud-local
|
||||
mountPath: /full-cloud-local
|
||||
- name: deploy
|
||||
mountPath: /mnt/cloud
|
||||
- name: local
|
||||
mountPath: /mnt/local
|
||||
{{- end }}
|
||||
- name: init-site
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsUser: 0
|
||||
image: "cloudyne.azurecr.io/buildahome/{{ .Values.site.name | default ( .Values.site.domain | replace "." "-" ) }}:{{ .Values.site.imageTag | default "latest" }}"
|
||||
image: "{{ .Values.site.image }}"
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: cloud
|
||||
mountPath: /full-cloud
|
||||
- name: serverconfig
|
||||
mountPath: /init-go/config.json
|
||||
subPath: init.json
|
||||
{{- if .Values.storage.wpContent }}
|
||||
{{- range $v := .Values.storage.wpContent }}
|
||||
- name: cloud-local
|
||||
mountPath: "/app/web/app/{{ $v }}"
|
||||
subPath: "{{ $v }}"
|
||||
{{- if .Values.storage.local.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
- name: local
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.additionalMounts }}
|
||||
{{- range $v := .Values.storage.additionalMounts }}
|
||||
- name: cloud-local
|
||||
mountPath: {{ $v.localPath }}
|
||||
subPath: {{ $v.cloudPath }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
- name: cloud
|
||||
mountPath: "/mnt/cloud"
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
- name: cloud
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "..fullname" . }}-env
|
||||
{{- if and .Values.secrets .Values.secrets.external }}
|
||||
{{- range .Values.secrets.external }}
|
||||
{{- if eq .type "env" }}
|
||||
- secretRef:
|
||||
name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- secretRef:
|
||||
name: {{ include "..fullname" . }}-db-auth
|
||||
- secretRef:
|
||||
name: global-secrets
|
||||
{{- if eq (.Values.site.container_base | default "debian" ) "debian" }}
|
||||
command: [ "/init-go/init-go" ]
|
||||
{{- else }}
|
||||
command: ["sh"]
|
||||
args: ["-c", "/init-go/init-go"]
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: wordpress
|
||||
securityContext:
|
||||
runAsUser: 101
|
||||
image: "cloudyne.azurecr.io/buildahome/{{ .Values.site.name | default ( .Values.site.domain | replace "." "-" ) }}:{{ .Values.site.imageTag | default "latest" }}"
|
||||
image: "{{ .Values.site.image }}"
|
||||
imagePullPolicy: Always
|
||||
volumeMounts:
|
||||
- name: serverconfig
|
||||
mountPath: /docker-entrypoint.d/unit.json
|
||||
subPath: unit.json
|
||||
mountPath: /init-go/config.json
|
||||
subPath: init.json
|
||||
{{- if .Values.storage.local.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
- name: local
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
- name: cloud
|
||||
mountPath: /var/cloud
|
||||
{{- if .Values.storage.wpContent }}
|
||||
{{- range $v := .Values.storage.wpContent }}
|
||||
- name: cloud-local
|
||||
mountPath: "/app/web/app/{{ $v }}"
|
||||
subPath: "{{ $v }}"
|
||||
mountPath: "/mnt/cloud"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.storage.additionalMounts }}
|
||||
{{- range $v := .Values.storage.additionalMounts }}
|
||||
- name: cloud-local
|
||||
mountPath: {{ $v.localPath }}
|
||||
subPath: {{ $v.cloudPath }}
|
||||
{{- else }}
|
||||
{{- if .Values.storage.cloud.active }}
|
||||
{{- range .Values.storage.folders }}
|
||||
- name: cloud
|
||||
mountPath: "/app/web/app/{{ . }}"
|
||||
subPath: "{{ . }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- include "..resourcelimits" . | nindent 10 }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "..fullname" . }}-env
|
||||
{{- if and .Values.secrets .Values.secrets.external }}
|
||||
{{- range .Values.secrets.external }}
|
||||
{{- if eq .type "env" }}
|
||||
- secretRef:
|
||||
name: "{{- include "..fullname" $ }}-exts-{{ .name }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
- secretRef:
|
||||
name: {{ include "..fullname" . }}-db-auth
|
||||
- secretRef:
|
||||
name: global-secrets
|
||||
{{- include "..resourcelimits" . | nindent 10 }}
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
protocol: TCP
|
||||
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user