Files
fission-src/charts/fission-all/templates/storagesvc/deployment.yaml
T
Ian ThompsonandGitHub e0c7a80fe0 Add support to customise storagesvc deployment strategy (#3196)
* chart>fission-all/values.yaml: Fix typo in imageppullsecrets

Fix a typo in comments.

* Add support to customise storagesvc deployment strategy

Add suport to `values.yaml` to allow customisation of the storagesvc deployment
strategy. The default is a rolling update with `maxSurge` and `maxUnavailable`
of 25%. Users with ReadWriteOnce persistent storage can use the `Recreate`
strategy.

Issue 3195
2025-10-31 17:40:13 +05:30

128 lines
4.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: storagesvc
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
svc: storagesvc
application: fission-storage
spec:
replicas: 1
selector:
matchLabels:
svc: storagesvc
application: fission-storage
strategy:
type: {{ .Values.storagesvc.deploymentStrategy.type }}
{{- if eq .Values.storagesvc.deploymentStrategy.type "RollingUpdate" }}
rollingUpdate:
{{- toYaml .Values.storagesvc.deploymentStrategy.rollingUpdate | nindent 6}}
{{- end }}
template:
metadata:
labels:
svc: storagesvc
application: fission-storage
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: "/metrics"
prometheus.io/port: "8080"
spec:
{{- if .Values.storagesvc.securityContext.enabled }}
securityContext: {{- omit .Values.storagesvc.securityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
containers:
- name: storagesvc
image: {{ include "fission-bundleImage" . | quote }}
imagePullPolicy: {{ .Values.pullPolicy }}
command: ["/fission-bundle"]
{{- if and (.Values.persistence.enabled) (eq (.Values.persistence.storageType | default "local") "s3") }}
args: ["--storageServicePort", "8000", "--storageType", "s3"]
{{- else }}
args: ["--storageServicePort", "8000", "--storageType", "local"]
{{- end }}
env:
- name: PRUNE_ENABLED
value: "{{.Values.storagesvc.archivePruner.enabled}}"
{{- if .Values.storagesvc.archivePruner.enabled }}
- name: PRUNE_INTERVAL
value: "{{.Values.storagesvc.archivePruner.interval}}"
{{- end }}
- name: DEBUG_ENV
value: {{ .Values.debugEnv | quote }}
- name: PPROF_ENABLED
value: {{ .Values.pprof.enabled | quote }}
{{- if and (.Values.persistence.enabled) (eq (.Values.persistence.storageType | default "local") "s3") }}
- name: STORAGE_S3_ENDPOINT
value: {{ .Values.persistence.s3.endPoint }}
- name: STORAGE_S3_BUCKET_NAME
value: {{ .Values.persistence.s3.bucketName }}
- name: STORAGE_S3_SUB_DIR
value: {{ .Values.persistence.s3.subDir }}
- name: STORAGE_S3_ACCESS_KEY_ID
value: {{ .Values.persistence.s3.accessKeyId }}
- name: STORAGE_S3_SECRET_ACCESS_KEY
value: {{ .Values.persistence.s3.secretAccessKey }}
- name: STORAGE_S3_REGION
value: {{ .Values.persistence.s3.region }}
{{- end }}
{{- include "fission-resource-namespace.envs" . | indent 8 }}
{{- include "kube_client.envs" . | indent 8 }}
{{- include "opentelemtry.envs" . | indent 8 }}
resources:
{{- toYaml .Values.storagesvc.resources | nindent 10 }}
{{- if ne (.Values.persistence.storageType | default "local") "s3" }}
volumeMounts:
- name: fission-storage
mountPath: /fission
{{- end }}
readinessProbe:
httpGet:
path: "/healthz"
port: 8000
initialDelaySeconds: 1
periodSeconds: 1
failureThreshold: 30
livenessProbe:
httpGet:
path: "/healthz"
port: 8000
initialDelaySeconds: 35
periodSeconds: 5
ports:
- containerPort: 8080
name: metrics
- containerPort: 8000
name: http
{{- if .Values.pprof.enabled }}
- containerPort: 6060
name: pprof
{{- end }}
{{- if .Values.terminationMessagePath }}
terminationMessagePath: {{ .Values.terminationMessagePath }}
{{- end }}
{{- if .Values.terminationMessagePolicy }}
terminationMessagePolicy: {{ .Values.terminationMessagePolicy }}
{{- end }}
serviceAccountName: fission-storagesvc
{{- if and (.Values.persistence.enabled) (ne (.Values.persistence.storageType | default "local") "s3") }}
volumes:
- name: fission-storage
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default "fission-storage-pvc" }}
{{- else }}
volumes:
- name: fission-storage
emptyDir: {}
{{- end }}
{{- if .Values.priorityClassName }}
priorityClassName: {{ .Values.priorityClassName }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.extraCoreComponentPodConfig }}
{{ toYaml .Values.extraCoreComponentPodConfig | indent 6 -}}
{{- end }}