Repo-standard flexible ingress (required clusterIssuer instead of the hardcoded letsencrypt-issuer, domain moved from config.domain to ingress.domain, className value, annotations merge, standard TLS secret name), secrets.<name>SecretRef structure, core secret renamed to the standard -secret name, additive tpl-rendered env block, documented PVC naming exception. Major bump 4.1.2+up4.7.0 -> 5.0.0+up4.7.0.
91 lines
3.5 KiB
YAML
91 lines
3.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
|
spec:
|
|
selector:
|
|
matchLabels:
|
|
app: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
|
serviceName: "{{ .Release.Name }}-{{ .Chart.Name }}-service"
|
|
replicas: {{ include "zipline.replicas" (dict "scaleDown" .Values.scaleDown "replicas" .Values.zipline.replicas) }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
|
spec:
|
|
securityContext:
|
|
{{- toYaml .Values.zipline.securityContext.pod | nindent 8 }}
|
|
containers:
|
|
- name: "{{ .Release.Name }}-{{ .Chart.Name }}-sfs"
|
|
image: "ghcr.io/diced/zipline:{{ .Chart.AppVersion }}"
|
|
securityContext:
|
|
{{- toYaml .Values.zipline.securityContext.container | nindent 12 }}
|
|
env:
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
|
key: connection-url
|
|
- name: CORE_DEFAULT_DOMAIN
|
|
value: "{{ .Values.ingress.domain }}"
|
|
- name: CORE_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: server-secret
|
|
- name: UPLOADER_ADMIN_LIMIT
|
|
value: 500mb
|
|
{{- range $value := .Values.zipline.env }}
|
|
{{- if $value.value }}
|
|
- name: {{ $value.name | quote }}
|
|
value: {{ tpl $value.value $ | quote }}
|
|
{{- else if $value.valueFrom }}
|
|
{{- if $value.valueFrom.secretKeyRef }}
|
|
- name: {{ $value.name }}
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ tpl $value.valueFrom.secretKeyRef.name $ | quote }}
|
|
key: {{ tpl $value.valueFrom.secretKeyRef.key $ | quote }}
|
|
{{- else if $value.valueFrom.configMapKeyRef }}
|
|
- name: {{ $value.name }}
|
|
valueFrom:
|
|
configMapKeyRef:
|
|
name: {{ tpl $value.valueFrom.configMapKeyRef.name $ | quote }}
|
|
key: {{ tpl $value.valueFrom.configMapKeyRef.key $ | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
{{- end }}
|
|
resources:
|
|
{{- include "zipline.resources" .Values.zipline.resources | nindent 12 }}
|
|
ports:
|
|
- name: "zipline-server"
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
{{- toYaml .Values.zipline.livenessProbe | nindent 12 }}
|
|
readinessProbe:
|
|
{{- toYaml .Values.zipline.readinessProbe | nindent 12 }}
|
|
startupProbe:
|
|
{{- toYaml .Values.zipline.startupProbe | nindent 12 }}
|
|
volumeMounts:
|
|
- name: zipline-volume
|
|
mountPath: /zipline/uploads
|
|
subPath: uploads/
|
|
- name: zipline-volume
|
|
mountPath: /zipline/public
|
|
subPath: public/
|
|
- name: zipline-volume
|
|
mountPath: /zipline/themes
|
|
subPath: themes/
|
|
# Zipline writes temporary chunks/files below /tmp; with a
|
|
# read-only root filesystem this must be a writable emptyDir.
|
|
- name: tmp
|
|
mountPath: /tmp
|
|
automountServiceAccountToken: false
|
|
volumes:
|
|
- name: tmp
|
|
emptyDir: {}
|
|
- name: zipline-volume
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-vc
|