Add chart flowise/6.0.0
This commit is contained in:
@@ -6,16 +6,16 @@
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- else if contains "NodePort" .Values.service.type }}
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "flowise.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
export NODE_PORT=$(kubectl get --namespace {{ include "common.names.namespace" . | quote }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "flowise.fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ include "common.names.namespace" . | quote }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo http://$NODE_IP:$NODE_PORT/
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "flowise.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "flowise.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
You can watch the status of by running 'kubectl get --namespace {{ include "common.names.namespace" . | quote }} svc -w {{ include "flowise.fullname" . }}'
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ include "common.names.namespace" . | quote }} {{ include "flowise.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo http://$SERVICE_IP:{{ .Values.service.ports.http }}/
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "flowise.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
export POD_NAME=$(kubectl get pods --namespace {{ include "common.names.namespace" . | quote }} -l "app.kubernetes.io/name={{ include "flowise.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||
echo "Visit http://127.0.0.1:3000/ to use your application"
|
||||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000:{{ .Values.containerPorts.http }}
|
||||
kubectl --namespace {{ include "common.names.namespace" . | quote }} port-forward $POD_NAME 3000:{{ .Values.containerPorts.http }}
|
||||
{{- end }}
|
||||
|
||||
@@ -34,21 +34,44 @@ Create chart name and version as used by the chart label.
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "flowise.labels" -}}
|
||||
{{- define "flowise.commonLabels" -}}
|
||||
helm.sh/chart: {{ include "flowise.chart" . }}
|
||||
{{ include "flowise.selectorLabels" . }}
|
||||
{{ include "flowise.commonSelectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common selector labels
|
||||
*/}}
|
||||
{{- define "flowise.commonSelectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "flowise.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Component labels
|
||||
*/}}
|
||||
{{- define "flowise.componentLabels" -}}
|
||||
app.kubernetes.io/component: flowise
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels
|
||||
*/}}
|
||||
{{- define "flowise.labels" -}}
|
||||
{{ include "flowise.commonLabels" . }}
|
||||
{{ include "flowise.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "flowise.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "flowise.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{ include "flowise.commonSelectorLabels" . }}
|
||||
{{ include "flowise.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
@@ -74,13 +97,13 @@ Create the name of the secret to use
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Key in Secret that contains password
|
||||
Key in Secret that contains encryption key
|
||||
*/}}
|
||||
{{- define "flowise.secretKeyPassword" -}}
|
||||
{{- define "flowise.secretKeyEncryptionKey" -}}
|
||||
{{- if .Values.existingSecret -}}
|
||||
{{ .Values.existingSecretKeyPassword }}
|
||||
{{ .Values.existingSecretKeyEncryptionKey }}
|
||||
{{- else -}}
|
||||
password
|
||||
encryption-key
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -231,8 +254,8 @@ PostgreSQL user
|
||||
PostgreSQL secret name
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.secretName" -}}
|
||||
{{- if .Values.postgresql.existingSecret -}}
|
||||
{{ .Values.postgresql.existingSecret }}
|
||||
{{- if .Values.postgresql.auth.existingSecret -}}
|
||||
{{ .Values.postgresql.auth.existingSecret }}
|
||||
{{- else if .Values.externalPostgresql.existingSecret -}}
|
||||
{{ .Values.externalPostgresql.existingSecret }}
|
||||
{{- else -}}
|
||||
@@ -261,3 +284,66 @@ PostgreSQL database
|
||||
{{ .Values.externalPostgresql.database }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis fully qualified app name
|
||||
*/}}
|
||||
{{- define "flowise.redis.fullname" -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "redis" .Values.redis.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis host
|
||||
*/}}
|
||||
{{- define "flowise.redis.host" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- printf "%s-%s" .Values.redis.fullnameOverride "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "redis" .Values.redis.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Values.externalRedis.host }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis port
|
||||
*/}}
|
||||
{{- define "flowise.redis.port" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{ .Values.redis.master.service.ports.redis }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalRedis.port }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis secret name
|
||||
*/}}
|
||||
{{- define "flowise.redis.secretName" -}}
|
||||
{{- if .Values.redis.auth.existingSecret -}}
|
||||
{{ .Values.redis.auth.existingSecret }}
|
||||
{{- else if .Values.externalRedis.existingSecret -}}
|
||||
{{ .Values.externalRedis.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "flowise.redis.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Key in Secret that contains Redis password
|
||||
*/}}
|
||||
{{- define "flowise.redis.secretKeyPassword" -}}
|
||||
{{- if .Values.externalRedis.existingSecret -}}
|
||||
{{ .Values.externalRedis.existingSecretKeyPassword }}
|
||||
{{- else -}}
|
||||
redis-password
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "flowise.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -13,6 +14,7 @@ metadata:
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "flowise.selectorLabels" . | nindent 6 }}
|
||||
@@ -40,6 +42,7 @@ spec:
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
enableServiceLinks: {{ .Values.enableServiceLinks }}
|
||||
{{- include "common.images.pullSecrets" ( dict "images" ( list .Values.image ) "global" .Values.global ) | nindent 6 }}
|
||||
{{- if .Values.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
||||
@@ -121,6 +124,34 @@ spec:
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.wait.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.redis.enabled .Values.externalRedis.enabled }}
|
||||
- name: wait-redis
|
||||
securityContext:
|
||||
{{- toYaml .Values.wait.securityContext | nindent 12 }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.wait.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.wait.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
wait4x redis "redis://default:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}" --timeout 0
|
||||
env:
|
||||
- name: REDIS_HOST
|
||||
value: {{ include "flowise.redis.host" . | quote }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ include "flowise.redis.port" . | quote }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.redis.secretName" . }}
|
||||
key: {{ include "flowise.redis.secretKeyPassword" . }}
|
||||
resources:
|
||||
{{- toYaml .Values.wait.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.wait.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.wait.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: flowise
|
||||
securityContext:
|
||||
@@ -134,17 +165,15 @@ spec:
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: MODE
|
||||
value: {{ .Values.config.mode | quote }}
|
||||
- name: PORT
|
||||
value: {{ .Values.containerPorts.http | quote }}
|
||||
{{- if and .Values.config.username .Values.config.password }}
|
||||
- name: FLOWISE_USERNAME
|
||||
value: {{ .Values.config.username | quote }}
|
||||
- name: FLOWISE_PASSWORD
|
||||
- name: FLOWISE_SECRETKEY_OVERWRITE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.secretName" . }}
|
||||
key: {{ include "flowise.secretKeyPassword" . }}
|
||||
{{- end }}
|
||||
key: {{ include "flowise.secretKeyEncryptionKey" . }}
|
||||
- name: APIKEY_PATH
|
||||
value: /data
|
||||
- name: BLOB_STORAGE_PATH
|
||||
@@ -187,8 +216,17 @@ spec:
|
||||
- name: DATABASE_NAME
|
||||
value: {{ include "flowise.postgresql.database" . | quote }}
|
||||
{{- end }}
|
||||
- name: DISABLE_FLOWISE_TELEMETRY
|
||||
value: "true"
|
||||
{{- if or .Values.redis.enabled .Values.externalRedis.enabled }}
|
||||
- name: REDIS_HOST
|
||||
value: {{ include "flowise.redis.host" . | quote }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ include "flowise.redis.port" . | quote }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.redis.secretName" . }}
|
||||
key: {{ include "flowise.redis.secretKeyPassword" . }}
|
||||
{{- end }}
|
||||
{{- if .Values.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,6 +3,7 @@ apiVersion: {{ include "common.capabilities.ingress.apiVersion" . }}
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ include "flowise.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -13,7 +14,7 @@ metadata:
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }}
|
||||
{{- if .Values.ingress.ingressClassName }}
|
||||
ingressClassName: {{ .Values.ingress.ingressClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.ingress.tls }}
|
||||
@@ -33,9 +34,7 @@ spec:
|
||||
paths:
|
||||
{{- range .paths }}
|
||||
- path: {{ . }}
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ $.Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend:
|
||||
{{- include "common.ingress.backend" (dict "serviceName" (include "flowise.fullname" $) "servicePort" $.Values.service.ports.http "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,8 +3,9 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "flowise.mariadb.secretName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- include "flowise.commonLabels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,6 +3,7 @@ apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "flowise.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -3,6 +3,7 @@ apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: {{ include "flowise.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -3,8 +3,9 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "flowise.postgresql.secretName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- include "flowise.commonLabels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if and .Values.externalRedis.enabled (not .Values.externalRedis.existingSecret) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "flowise.redis.secretName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.commonLabels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
redis-password: {{ .Values.externalRedis.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
@@ -3,6 +3,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "flowise.secretName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -13,7 +14,5 @@ metadata:
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if and .Values.config.username .Values.config.password }}
|
||||
password: {{ .Values.config.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
encryption-key: {{ .Values.config.encryptionKey | b64enc | quote }}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "flowise.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
@@ -16,6 +17,12 @@ spec:
|
||||
{{- if and (eq .Values.service.type "ClusterIP") .Values.service.clusterIP }}
|
||||
clusterIP: {{ .Values.service.clusterIP }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ .Values.service.ipFamilyPolicy }}
|
||||
{{- end }}
|
||||
{{- if not (empty .Values.service.ipFamilies)}}
|
||||
ipFamilies: {{- toYaml .Values.service.ipFamilies | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.service.sessionAffinity }}
|
||||
sessionAffinity: {{ .Values.service.sessionAffinity }}
|
||||
{{- end }}
|
||||
|
||||
@@ -3,6 +3,7 @@ apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "flowise.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -14,9 +14,9 @@ app.kubernetes.io/component: tests
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
Labels
|
||||
*/}}
|
||||
{{- define "flowise.tests.labels" -}}
|
||||
{{ include "flowise.labels" . }}
|
||||
{{ include "flowise.commonLabels" . }}
|
||||
{{ include "flowise.tests.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "flowise.tests.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.tests.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ include "flowise.tests.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.tests.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
*/}}
|
||||
{{- define "flowise.worker.fullname" -}}
|
||||
{{- printf "%s-%s" (include "flowise.fullname" .) "worker" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Component labels
|
||||
*/}}
|
||||
{{- define "flowise.worker.componentLabels" -}}
|
||||
app.kubernetes.io/component: worker
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Labels
|
||||
*/}}
|
||||
{{- define "flowise.worker.labels" -}}
|
||||
{{ include "flowise.commonLabels" . }}
|
||||
{{ include "flowise.worker.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "flowise.worker.selectorLabels" -}}
|
||||
{{ include "flowise.commonSelectorLabels" . }}
|
||||
{{ include "flowise.worker.componentLabels" . }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "flowise.worker.serviceAccountName" -}}
|
||||
{{- if .Values.worker.serviceAccount.create -}}
|
||||
{{ default (include "flowise.worker.fullname" .) .Values.worker.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" .Values.worker.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB fully qualified app name
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.fullname" -}}
|
||||
{{- if .Values.mariadb.fullnameOverride -}}
|
||||
{{- .Values.mariadb.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "mariadb" .Values.mariadb.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB host
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.host" -}}
|
||||
{{- if .Values.mariadb.enabled -}}
|
||||
{{- if eq .Values.mariadb.architecture "replication" -}}
|
||||
{{- if .Values.mariadb.fullnameOverride -}}
|
||||
{{- printf "%s-%s" .Values.mariadb.fullnameOverride "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "mariadb" .Values.mariadb.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ include "flowise.mariadb.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Values.externalMariadb.host }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB port
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.port" -}}
|
||||
{{- if .Values.mariadb.enabled -}}
|
||||
{{ .Values.mariadb.primary.service.ports.mysql }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalMariadb.port }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB user
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.username" -}}
|
||||
{{- if .Values.mariadb.enabled -}}
|
||||
{{ .Values.mariadb.auth.username }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalMariadb.username }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB secret name
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.secretName" -}}
|
||||
{{- if .Values.mariadb.auth.existingSecret -}}
|
||||
{{ .Values.mariadb.auth.existingSecret }}
|
||||
{{- else if .Values.externalMariadb.existingSecret -}}
|
||||
{{ .Values.externalMariadb.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "flowise.mariadb.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Key in Secret that contains MariaDB password
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.secretKeyPassword" -}}
|
||||
{{- if .Values.externalMariadb.existingSecret -}}
|
||||
{{ .Values.externalMariadb.existingSecretKeyPassword }}
|
||||
{{- else -}}
|
||||
mariadb-password
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
MariaDB database
|
||||
*/}}
|
||||
{{- define "flowise.mariadb.database" -}}
|
||||
{{- if .Values.mariadb.enabled -}}
|
||||
{{ .Values.mariadb.auth.database }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalMariadb.database }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL fully qualified app name
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.fullname" -}}
|
||||
{{- if .Values.postgresql.fullnameOverride -}}
|
||||
{{- .Values.postgresql.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL host
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.host" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{- if eq .Values.postgresql.architecture "replication" -}}
|
||||
{{- if .Values.postgresql.fullnameOverride -}}
|
||||
{{- printf "%s-%s" .Values.postgresql.fullnameOverride "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "postgresql" .Values.postgresql.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name "primary" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ include "flowise.postgresql.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Values.externalPostgresql.host }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL port
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.port" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{ .Values.postgresql.primary.service.ports.postgresql }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalPostgresql.port }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL user
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.username" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{ .Values.postgresql.auth.username }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalPostgresql.username }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL secret name
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.secretName" -}}
|
||||
{{- if .Values.postgresql.auth.existingSecret -}}
|
||||
{{ .Values.postgresql.auth.existingSecret }}
|
||||
{{- else if .Values.externalPostgresql.existingSecret -}}
|
||||
{{ .Values.externalPostgresql.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "flowise.postgresql.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Key in Secret that contains PostgreSQL password
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.secretKeyPassword" -}}
|
||||
{{- if .Values.externalPostgresql.existingSecret -}}
|
||||
{{ .Values.externalPostgresql.existingSecretKeyPassword }}
|
||||
{{- else -}}
|
||||
password
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
PostgreSQL database
|
||||
*/}}
|
||||
{{- define "flowise.postgresql.database" -}}
|
||||
{{- if .Values.postgresql.enabled -}}
|
||||
{{ .Values.postgresql.auth.database }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalPostgresql.database }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis fully qualified app name
|
||||
*/}}
|
||||
{{- define "flowise.redis.fullname" -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- .Values.redis.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "redis" .Values.redis.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis host
|
||||
*/}}
|
||||
{{- define "flowise.redis.host" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{- if .Values.redis.fullnameOverride -}}
|
||||
{{- printf "%s-%s" .Values.redis.fullnameOverride "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default "redis" .Values.redis.nameOverride -}}
|
||||
{{- printf "%s-%s-%s" .Release.Name $name "master" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{ .Values.externalRedis.host }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis port
|
||||
*/}}
|
||||
{{- define "flowise.redis.port" -}}
|
||||
{{- if .Values.redis.enabled -}}
|
||||
{{ .Values.redis.master.service.ports.redis }}
|
||||
{{- else -}}
|
||||
{{ .Values.externalRedis.port }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Redis secret name
|
||||
*/}}
|
||||
{{- define "flowise.redis.secretName" -}}
|
||||
{{- if .Values.redis.auth.existingSecret -}}
|
||||
{{ .Values.redis.auth.existingSecret }}
|
||||
{{- else if .Values.externalRedis.existingSecret -}}
|
||||
{{ .Values.externalRedis.existingSecret }}
|
||||
{{- else -}}
|
||||
{{ include "flowise.redis.fullname" . }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Key in Secret that contains Redis password
|
||||
*/}}
|
||||
{{- define "flowise.redis.secretKeyPassword" -}}
|
||||
{{- if .Values.externalRedis.existingSecret -}}
|
||||
{{ .Values.externalRedis.existingSecretKeyPassword }}
|
||||
{{- else -}}
|
||||
redis-password
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,288 @@
|
||||
{{- if .Values.worker.enabled }}
|
||||
apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "flowise.worker.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.worker.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.worker.deploymentAnnotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.worker.deploymentAnnotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.worker.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.worker.revisionHistoryLimit }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "flowise.worker.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "flowise.worker.selectorLabels" . | nindent 8 }}
|
||||
{{- if .Values.worker.podLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.podLabels "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.worker.podAnnotations .Values.commonAnnotations }}
|
||||
annotations:
|
||||
{{- if .Values.worker.podAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.worker.podAnnotations "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
enableServiceLinks: {{ .Values.worker.enableServiceLinks }}
|
||||
{{- include "common.images.pullSecrets" ( dict "images" ( list .Values.worker.image ) "global" .Values.global ) | nindent 6 }}
|
||||
{{- if .Values.worker.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.worker.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.priorityClassName }}
|
||||
priorityClassName: {{ .Values.worker.priorityClassName | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.runtimeClassName }}
|
||||
runtimeClassName: {{ .Values.worker.runtimeClassName | quote }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "flowise.worker.serviceAccountName" . }}
|
||||
{{- if .Values.worker.topologySpreadConstraints }}
|
||||
topologySpreadConstraints: {{- include "common.tplvalues.render" (dict "value" .Values.worker.topologySpreadConstraints "context" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.worker.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- if or .Values.mariadb.enabled .Values.externalMariadb.enabled }}
|
||||
- name: wait-mariadb
|
||||
securityContext:
|
||||
{{- toYaml .Values.wait.securityContext | nindent 12 }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.wait.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.wait.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
wait4x mysql "${MARIADB_USERNAME}:${MARIADB_PASSWORD}@tcp(${MARIADB_HOST}:${MARIADB_PORT})/${MARIADB_DATABASE}" --timeout 0
|
||||
env:
|
||||
- name: MARIADB_HOST
|
||||
value: {{ include "flowise.mariadb.host" . | quote }}
|
||||
- name: MARIADB_PORT
|
||||
value: {{ include "flowise.mariadb.port" . | quote }}
|
||||
- name: MARIADB_USERNAME
|
||||
value: {{ include "flowise.mariadb.username" . | quote }}
|
||||
- name: MARIADB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.mariadb.secretName" . }}
|
||||
key: {{ include "flowise.mariadb.secretKeyPassword" . }}
|
||||
- name: MARIADB_DATABASE
|
||||
value: {{ include "flowise.mariadb.database" . | quote }}
|
||||
resources:
|
||||
{{- toYaml .Values.wait.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.wait.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.wait.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.postgresql.enabled .Values.externalPostgresql.enabled }}
|
||||
- name: wait-postgresql
|
||||
securityContext:
|
||||
{{- toYaml .Values.wait.securityContext | nindent 12 }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.wait.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.wait.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
wait4x postgresql "postgres://${POSTGRESQL_USERNAME}:${POSTGRESQL_PASSWORD}@${POSTGRESQL_HOST}:${POSTGRESQL_PORT}/${POSTGRESQL_DATABASE}?sslmode=disable" --timeout 0
|
||||
env:
|
||||
- name: POSTGRESQL_HOST
|
||||
value: {{ include "flowise.postgresql.host" . | quote }}
|
||||
- name: POSTGRESQL_PORT
|
||||
value: {{ include "flowise.postgresql.port" . | quote }}
|
||||
- name: POSTGRESQL_USERNAME
|
||||
value: {{ include "flowise.postgresql.username" . | quote }}
|
||||
- name: POSTGRESQL_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.postgresql.secretName" . }}
|
||||
key: {{ include "flowise.postgresql.secretKeyPassword" . }}
|
||||
- name: POSTGRESQL_DATABASE
|
||||
value: {{ include "flowise.postgresql.database" . | quote }}
|
||||
resources:
|
||||
{{- toYaml .Values.wait.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.wait.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.wait.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if or .Values.redis.enabled .Values.externalRedis.enabled }}
|
||||
- name: wait-redis
|
||||
securityContext:
|
||||
{{- toYaml .Values.wait.securityContext | nindent 12 }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.wait.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.wait.image.pullPolicy }}
|
||||
command:
|
||||
- /bin/sh
|
||||
- -ec
|
||||
- |
|
||||
wait4x redis "redis://default:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}" --timeout 0
|
||||
env:
|
||||
- name: REDIS_HOST
|
||||
value: {{ include "flowise.redis.host" . | quote }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ include "flowise.redis.port" . | quote }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.redis.secretName" . }}
|
||||
key: {{ include "flowise.redis.secretKeyPassword" . }}
|
||||
resources:
|
||||
{{- toYaml .Values.wait.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.wait.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.wait.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: worker
|
||||
securityContext:
|
||||
{{- toYaml .Values.worker.securityContext | nindent 12 }}
|
||||
image: {{ include "common.images.image" ( dict "imageRoot" .Values.worker.image "global" .Values.global ) }}
|
||||
imagePullPolicy: {{ .Values.worker.image.pullPolicy }}
|
||||
{{- if .Values.worker.extraArgs }}
|
||||
args:
|
||||
{{- range $key, $value := .Values.worker.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: WORKER_PORT
|
||||
value: {{ .Values.worker.containerPorts.probes | quote }}
|
||||
- name: FLOWISE_SECRETKEY_OVERWRITE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.secretName" . }}
|
||||
key: {{ include "flowise.secretKeyEncryptionKey" . }}
|
||||
{{- if or .Values.mariadb.enabled .Values.externalMariadb.enabled }}
|
||||
- name: DATABASE_TYPE
|
||||
value: mysql
|
||||
- name: DATABASE_HOST
|
||||
value: {{ include "flowise.mariadb.host" . | quote }}
|
||||
- name: DATABASE_PORT
|
||||
value: {{ include "flowise.mariadb.port" . | quote }}
|
||||
- name: DATABASE_USER
|
||||
value: {{ include "flowise.mariadb.username" . | quote }}
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.mariadb.secretName" . }}
|
||||
key: {{ include "flowise.mariadb.secretKeyPassword" . }}
|
||||
- name: DATABASE_NAME
|
||||
value: {{ include "flowise.mariadb.database" . | quote }}
|
||||
{{- end }}
|
||||
{{- if or .Values.postgresql.enabled .Values.externalPostgresql.enabled }}
|
||||
- name: DATABASE_TYPE
|
||||
value: postgres
|
||||
- name: DATABASE_HOST
|
||||
value: {{ include "flowise.postgresql.host" . | quote }}
|
||||
- name: DATABASE_PORT
|
||||
value: {{ include "flowise.postgresql.port" . | quote }}
|
||||
- name: DATABASE_USER
|
||||
value: {{ include "flowise.postgresql.username" . | quote }}
|
||||
- name: DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.postgresql.secretName" . }}
|
||||
key: {{ include "flowise.postgresql.secretKeyPassword" . }}
|
||||
- name: DATABASE_NAME
|
||||
value: {{ include "flowise.postgresql.database" . | quote }}
|
||||
{{- end }}
|
||||
- name: REDIS_HOST
|
||||
value: {{ include "flowise.redis.host" . | quote }}
|
||||
- name: REDIS_PORT
|
||||
value: {{ include "flowise.redis.port" . | quote }}
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "flowise.redis.secretName" . }}
|
||||
key: {{ include "flowise.redis.secretKeyPassword" . }}
|
||||
{{- if .Values.worker.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.worker.extraEnvVarsCM .Values.worker.extraEnvVarsSecret }}
|
||||
envFrom:
|
||||
{{- if .Values.worker.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsCM "context" $) }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ include "common.tplvalues.render" (dict "value" .Values.worker.extraEnvVarsSecret "context" $) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http-probes
|
||||
containerPort: {{ .Values.worker.containerPorts.probes }}
|
||||
protocol: TCP
|
||||
{{- if .Values.worker.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http-probes
|
||||
initialDelaySeconds: {{ .Values.worker.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.worker.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.worker.livenessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.worker.livenessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.worker.livenessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http-probes
|
||||
initialDelaySeconds: {{ .Values.worker.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.worker.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.worker.readinessProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.worker.readinessProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.worker.readinessProbe.successThreshold }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.startupProbe.enabled }}
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: http-probes
|
||||
initialDelaySeconds: {{ .Values.worker.startupProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.worker.startupProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.worker.startupProbe.timeoutSeconds }}
|
||||
failureThreshold: {{ .Values.worker.startupProbe.failureThreshold }}
|
||||
successThreshold: {{ .Values.worker.startupProbe.successThreshold }}
|
||||
{{- end }}
|
||||
resources:
|
||||
{{- toYaml .Values.worker.resources | nindent 12 }}
|
||||
volumeMounts:
|
||||
{{- if .Values.worker.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.worker.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.worker.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.worker.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
{{- if .Values.worker.extraVolumes }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.worker.extraVolumes "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.worker.enabled }}
|
||||
{{- if .Values.worker.pdb.create }}
|
||||
apiVersion: {{ include "common.capabilities.policy.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "flowise.worker.fullname" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.worker.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.worker.pdb.minAvailable }}
|
||||
minAvailable: {{ .Values.worker.pdb.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.worker.pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.worker.pdb.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "flowise.worker.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if .Values.worker.enabled }}
|
||||
{{- if .Values.worker.serviceAccount.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "flowise.worker.serviceAccountName" . }}
|
||||
namespace: {{ include "common.names.namespace" . | quote }}
|
||||
labels:
|
||||
{{- include "flowise.worker.labels" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.worker.serviceAccount.annotations .Values.commonAnnotations }}
|
||||
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.worker.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user