diff --git a/charts/dify/Chart.yaml b/charts/dify/Chart.yaml index c7a2422..50431ed 100644 --- a/charts/dify/Chart.yaml +++ b/charts/dify/Chart.yaml @@ -20,7 +20,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.4.0 +version: 0.4.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/dify/templates/_helpers.tpl b/charts/dify/templates/_helpers.tpl index 16035e0..5ed57af 100644 --- a/charts/dify/templates/_helpers.tpl +++ b/charts/dify/templates/_helpers.tpl @@ -50,6 +50,15 @@ app.kubernetes.io/name: {{ include "dify.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} +{{/* +Global labels +*/}} +{{- define "dify.global.labels" -}} +{{- if .Values.global.labels }} +{{- toYaml .Values.global.labels }} +{{- end -}} +{{- end -}} + {{/* Create the name of the service account to use */}} diff --git a/charts/dify/templates/deployment.yaml b/charts/dify/templates/deployment.yaml index 7660014..58c7555 100644 --- a/charts/dify/templates/deployment.yaml +++ b/charts/dify/templates/deployment.yaml @@ -7,6 +7,7 @@ metadata: labels: {{- include "dify.labels" . | nindent 4 }} app.kubernetes.io/component: api + {{- include "dify.global.labels" . | nindent 4 }} spec: {{- if not .Values.api.autoscaling.enabled }} replicas: {{ .Values.api.replicaCount }} @@ -24,6 +25,7 @@ spec: labels: {{- include "dify.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: api + {{- include "dify.global.labels" . | nindent 8 }} spec: {{- with .Values.api.imagePullSecrets }} imagePullSecrets: @@ -108,6 +110,7 @@ metadata: labels: {{- include "dify.labels" . | nindent 4 }} app.kubernetes.io/component: worker + {{- include "dify.global.labels" . | nindent 4 }} spec: {{- if not .Values.worker.autoscaling.enabled }} replicas: {{ .Values.worker.replicaCount }} @@ -125,6 +128,7 @@ spec: labels: {{- include "dify.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: worker + {{- include "dify.global.labels" . | nindent 8 }} spec: {{- with .Values.worker.imagePullSecrets }} imagePullSecrets: @@ -192,6 +196,7 @@ metadata: labels: {{- include "dify.labels" . | nindent 4 }} app.kubernetes.io/component: frontend + {{- include "dify.global.labels" . | nindent 4 }} spec: {{- if not .Values.frontend.autoscaling.enabled }} replicas: {{ .Values.frontend.replicaCount }} @@ -209,6 +214,7 @@ spec: labels: {{- include "dify.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: frontend + {{- include "dify.global.labels" . | nindent 8 }} spec: {{- with .Values.frontend.imagePullSecrets }} imagePullSecrets: @@ -268,6 +274,7 @@ metadata: labels: {{- include "dify.labels" . | nindent 4 }} app.kubernetes.io/component: sandbox + {{- include "dify.global.labels" . | nindent 4 }} spec: {{- if not .Values.sandbox.autoscaling.enabled }} replicas: {{ .Values.sandbox.replicaCount }} @@ -285,6 +292,7 @@ spec: labels: {{- include "dify.selectorLabels" . | nindent 8 }} app.kubernetes.io/component: sandbox + {{- include "dify.global.labels" . | nindent 8 }} spec: {{- with .Values.sandbox.imagePullSecrets }} imagePullSecrets: diff --git a/charts/dify/values.yaml b/charts/dify/values.yaml index 82d5910..f13cf16 100644 --- a/charts/dify/values.yaml +++ b/charts/dify/values.yaml @@ -41,6 +41,9 @@ global: # name: dify # key: SECRET_KEY + # Provide extra labels for all deployments and related pods of this chart + labels: {} + ingress: enabled: false className: ""