@@ -67,67 +67,67 @@ spec:
6767 securityContext : {{- omit .Values.api.podSecurityContext "enabled" | toYaml | nindent 8 }}
6868 {{- end }}
6969 containers :
70- - image : " {{ .Values.image.api.repository }}:{{ default .Chart.AppVersion .Values.image.api.tag }}"
71- imagePullPolicy : " {{ .Values.image.api.pullPolicy }}"
72- name : api
73- {{- if .Values.api.customLivenessProbe }}
74- livenessProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customLivenessProbe "context" $) | nindent 10 }}
75- {{- else if .Values.api.livenessProbe.enabled }}
76- livenessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.livenessProbe "enabled") "context" $) | nindent 10 }}
77- httpGet :
78- path : /health
79- port : api
80- {{- end }}
81- {{- if .Values.api.customReadinessProbe }}
82- readinessProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customReadinessProbe "context" $) | nindent 10 }}
83- {{- else if .Values.api.readinessProbe.enabled }}
84- readinessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.readinessProbe "enabled") "context" $) | nindent 10 }}
85- httpGet :
86- path : /health
87- port : api
88- {{- end }}
89- {{- if .Values.api.customStartupProbe }}
90- startupProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customStartupProbe "context" $) | nindent 10 }}
91- {{- else if .Values.api.startupProbe.enabled }}
92- startupProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.startupProbe "enabled") "context" $) | nindent 10 }}
93- tcpSocket :
94- port : api
95- {{- end }}
96- # We don't require a privileged container in this case
97- {{- if .Values.api.containerSecurityContext.enabled }}
98- securityContext : {{- omit .Values.api.containerSecurityContext "enabled" | toYaml | nindent 10 }}
99- {{- end }}
100- env :
101- {{- if .Values.sandbox.enabled }}
102- - name : CODE_EXECUTION_API_KEY
103- valueFrom :
104- secretKeyRef :
105- name : {{ template "dify.sandbox.fullname" . }}
106- key : " API_KEY"
107- {{- end }}
108- {{- if .Values.api.extraEnv }}
109- {{- toYaml .Values.api.extraEnv | nindent 8 }}
110- {{- end }}
111- envFrom :
112- - configMapRef :
113- name : {{ template "dify.api.fullname" . }}
114- - secretRef :
115- name : {{ template "dify.api.fullname" . }}
116- ports :
117- - name : api
118- containerPort : 5001
119- protocol : TCP
120- resources :
121- {{- toYaml .Values.api.resources | nindent 12 }}
122- volumeMounts :
123- {{- if $usePvc }}
124- - name : app-data
125- mountPath : {{ .Values.api.persistence.mountPath | quote }}
126- subPath : {{ .Values.api.persistence.persistentVolumeClaim.subPath | default "" }}
70+ - image : " {{ .Values.image.api.repository }}:{{ default .Chart.AppVersion .Values.image.api.tag }}"
71+ imagePullPolicy : " {{ .Values.image.api.pullPolicy }}"
72+ name : api
73+ {{- if .Values.api.customLivenessProbe }}
74+ livenessProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customLivenessProbe "context" $) | nindent 12 }}
75+ {{- else if .Values.api.livenessProbe.enabled }}
76+ livenessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.livenessProbe "enabled") "context" $) | nindent 12 }}
77+ httpGet :
78+ path : /health
79+ port : api
80+ {{- end }}
81+ {{- if .Values.api.customReadinessProbe }}
82+ readinessProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customReadinessProbe "context" $) | nindent 12 }}
83+ {{- else if .Values.api.readinessProbe.enabled }}
84+ readinessProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.readinessProbe "enabled") "context" $) | nindent 12 }}
85+ httpGet :
86+ path : /health
87+ port : api
88+ {{- end }}
89+ {{- if .Values.api.customStartupProbe }}
90+ startupProbe : {{- include "common.tplvalues.render" (dict "value" .Values.api.customStartupProbe "context" $) | nindent 12 }}
91+ {{- else if .Values.api.startupProbe.enabled }}
92+ startupProbe : {{- include "common.tplvalues.render" (dict "value" (omit .Values.api.startupProbe "enabled") "context" $) | nindent 12 }}
93+ tcpSocket :
94+ port : api
12795 {{- end }}
128- {{- if .Values.api.extraVolumeMounts }}
129- {{- include "common.tplvalues.render" (dict "value" .Values.api.extraVolumeMounts "context" $) | nindent 10 }}
96+ # We don't require a privileged container in this case
97+ {{- if .Values.api.containerSecurityContext.enabled }}
98+ securityContext : {{- omit .Values.api.containerSecurityContext "enabled" | toYaml | nindent 12 }}
13099 {{- end }}
100+ env :
101+ {{- if .Values.sandbox.enabled }}
102+ - name : CODE_EXECUTION_API_KEY
103+ valueFrom :
104+ secretKeyRef :
105+ name : {{ template "dify.sandbox.fullname" . }}
106+ key : " API_KEY"
107+ {{- end }}
108+ {{- if .Values.api.extraEnv }}
109+ {{- toYaml .Values.api.extraEnv | nindent 12 }}
110+ {{- end }}
111+ envFrom :
112+ - configMapRef :
113+ name : {{ template "dify.api.fullname" . }}
114+ - secretRef :
115+ name : {{ template "dify.api.fullname" . }}
116+ ports :
117+ - name : api
118+ containerPort : 5001
119+ protocol : TCP
120+ resources :
121+ {{- toYaml .Values.api.resources | nindent 14 }}
122+ volumeMounts :
123+ {{- if $usePvc }}
124+ - name : app-data
125+ mountPath : {{ .Values.api.persistence.mountPath | quote }}
126+ subPath : {{ .Values.api.persistence.persistentVolumeClaim.subPath | default "" }}
127+ {{- end }}
128+ {{- if .Values.api.extraVolumeMounts }}
129+ {{- include "common.tplvalues.render" (dict "value" .Values.api.extraVolumeMounts "context" $) | nindent 12 }}
130+ {{- end }}
131131 {{- if and (.Values.nodeSelector) (not .Values.api.nodeSelector) }}
132132 nodeSelector :
133133 {{- toYaml .Values.nodeSelector | nindent 8 }}
0 commit comments