Started creating chart
This commit is contained in:
@@ -1,61 +1,63 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ include "..fullname" . }}
|
||||
labels:
|
||||
{{- include "..labels" . | nindent 4 }}
|
||||
name: {{ include "..fullname" . }}-cert
|
||||
labels:
|
||||
{{- include "..labels" . | nindent 8 }}
|
||||
cloudyne.systems/component: site
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "..selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "..selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "..serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: http
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if and .Values.customer .Values.customer.package }}
|
||||
replicas: {{ .Values.customer.package.replicas | default 1 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
cloudyne.systems/customer: {{ .Values.customer.name }}
|
||||
cloudyne.systems/site: {{ .Values.site.url }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
cloudyne.systems/customer: {{ .Values.customer.name }}
|
||||
cloudyne.systems/site: {{ .Values.site.url }}
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 65534
|
||||
volumes:
|
||||
- name: cloud
|
||||
persistentVolumeClaim:
|
||||
claimName: pvc-{{ include "..fullname" . }}
|
||||
- name: local
|
||||
emptyDir: {}
|
||||
initContainers:
|
||||
- name: deploy
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsUser: 0
|
||||
{{- if .Values.global }}
|
||||
image: {{ .Values.global.initImage }}:{{ .Values.global.imagetag }}
|
||||
{{- else }}
|
||||
image: ghcr.io/cloudynes/php-init:latest
|
||||
{{- end }}
|
||||
imagePullPolicy: Always
|
||||
command: [ "bash", "/init-py/init.sh" ]
|
||||
volumeMounts:
|
||||
- name: site
|
||||
mountPath: /app
|
||||
{{- if and .Values.site .Values.site.storage .Values.site.storage.cloud .Values.site.storage.cloud.folders }}
|
||||
{{- range $v := .Values.site.storage.cloud.folders }}
|
||||
- name: cloud
|
||||
mountPath: {{ $v.localPath }}
|
||||
subPath: {{ $v.cloudPath }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "..fullname" . }}-env
|
||||
- secretRef:
|
||||
name: {{ include "..fullname" . }}-db-auth
|
||||
containers:
|
||||
- name: wordpress
|
||||
securityContext:
|
||||
runAsUser: 65534
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user