Change chart directory structure
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "langfuse.fullname" . }}-worker
|
||||
labels:
|
||||
{{- include "langfuse.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.langfuse.worker.hpa.enabled }}
|
||||
replicas: {{ .Values.langfuse.worker.replicas | default .Values.langfuse.replicas }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "langfuse.selectorLabels" . | nindent 6 }}
|
||||
app: worker
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.langfuse.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- include "langfuse.selectorLabels" . | nindent 8 }}
|
||||
app: worker
|
||||
spec:
|
||||
{{- with (.Values.langfuse.worker.image.pullSecrets | default .Values.langfuse.image.pullSecrets) }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "langfuse.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.langfuse.podSecurityContext | nindent 8 }}
|
||||
{{- if .Values.langfuse.extraInitContainers }}
|
||||
initContainers:
|
||||
{{- toYaml .Values.langfuse.extraInitContainers | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.langfuse.extraVolumes }}
|
||||
volumes:
|
||||
{{- toYaml .Values.langfuse.extraVolumes | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
{{- if .Values.langfuse.extraContainers }}
|
||||
{{- toYaml .Values.langfuse.extraContainers | nindent 8 }}
|
||||
{{- end }}
|
||||
- name: {{ .Chart.Name }}-worker
|
||||
securityContext:
|
||||
{{- toYaml .Values.langfuse.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.langfuse.worker.image.repository }}:{{ coalesce .Values.langfuse.worker.image.tag .Values.langfuse.image.tag .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.langfuse.worker.image.pullPolicy | default .Values.langfuse.image.pullPolicy }}
|
||||
env:
|
||||
{{- include "langfuse.commonEnv" . | nindent 12 }}
|
||||
{{- if .Values.langfuse.additionalEnv }}
|
||||
{{- toYaml .Values.langfuse.additionalEnv | nindent 12 }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /api/health
|
||||
port: http
|
||||
initialDelaySeconds: {{ .Values.langfuse.worker.livenessProbe.initialDelaySeconds | default 20 }}
|
||||
periodSeconds: {{ .Values.langfuse.worker.livenessProbe.periodSeconds | default 10 }}
|
||||
timeoutSeconds: {{ .Values.langfuse.worker.livenessProbe.timeoutSeconds | default 5 }}
|
||||
successThreshold: {{ .Values.langfuse.worker.livenessProbe.successThreshold | default 1 }}
|
||||
failureThreshold: {{ .Values.langfuse.worker.livenessProbe.failureThreshold | default 5 }}
|
||||
resources:
|
||||
{{- toYaml (.Values.langfuse.worker.resources | default .Values.langfuse.resources) | nindent 12 }}
|
||||
{{- if .Values.langfuse.extraVolumeMounts }}
|
||||
volumeMounts:
|
||||
{{- toYaml .Values.langfuse.extraVolumeMounts | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,32 @@
|
||||
{{- if ((.Values.langfuse.worker).hpa).enabled }}
|
||||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "langfuse.fullname" . }}-worker
|
||||
labels:
|
||||
{{- include "langfuse.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "langfuse.fullname" . }}-worker
|
||||
minReplicas: {{ .Values.langfuse.worker.hpa.minReplicas }}
|
||||
maxReplicas: {{ .Values.langfuse.worker.hpa.maxReplicas }}
|
||||
metrics:
|
||||
{{- with .Values.langfuse.worker.hpa.targetCPUUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.worker.hpa.targetMemoryUtilizationPercentage }}
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,34 @@
|
||||
{{- if and (.Capabilities.APIVersions.Has "autoscaling.k8s.io/v1") .Values.langfuse.worker.vpa.enabled }}
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "langfuse.fullname" . }}-worker
|
||||
labels:
|
||||
{{- include "langfuse.labels" . | nindent 4 }}
|
||||
spec:
|
||||
resourcePolicy:
|
||||
containerPolicies:
|
||||
- containerName: {{ .Chart.Name }}-worker
|
||||
{{- with .Values.langfuse.worker.vpa.controlledResources }}
|
||||
controlledResources:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.worker.vpa.maxAllowed }}
|
||||
maxAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.langfuse.worker.vpa.minAllowed }}
|
||||
minAllowed:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
targetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "langfuse.fullname" . }}-worker
|
||||
{{- if .Values.langfuse.worker.vpa.updatePolicy }}
|
||||
updatePolicy:
|
||||
{{- with .Values.langfuse.worker.vpa.updatePolicy.updateMode }}
|
||||
updateMode: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user