From a8d8eb9b8561dfa568a6b06dd275116264f17743 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Fri, 25 Aug 2023 08:31:49 +0200 Subject: [PATCH] [bitnami/milvus] Support for customizing standard labels (#18627) --- bitnami/milvus/Chart.lock | 6 ++--- bitnami/milvus/Chart.yaml | 2 +- bitnami/milvus/templates/attu/deployment.yaml | 24 +++++++------------ bitnami/milvus/templates/attu/hpa.yaml | 14 +++-------- .../templates/attu/ingress-tls-secret.yaml | 10 ++------ bitnami/milvus/templates/attu/ingress.yaml | 14 +++-------- .../milvus/templates/attu/networkpolicy.yaml | 17 +++++-------- bitnami/milvus/templates/attu/pdb.yaml | 8 +++---- .../templates/attu/service-account.yaml | 16 ++++--------- bitnami/milvus/templates/attu/service.yaml | 17 ++++--------- bitnami/milvus/templates/attu/vpa.yaml | 14 ++++------- bitnami/milvus/templates/configmap.yaml | 5 +--- .../templates/data-coordinator/configmap.yaml | 5 +--- .../data-coordinator/deployment.yaml | 17 +++++-------- .../data-coordinator/extra-configmap.yaml | 5 +--- .../templates/data-coordinator/hpa.yaml | 14 +++-------- .../data-coordinator/networkpolicy.yaml | 17 +++++-------- .../templates/data-coordinator/pdb.yaml | 8 +++---- .../data-coordinator/service-account.yaml | 16 ++++--------- .../templates/data-coordinator/service.yaml | 18 ++++++-------- .../data-coordinator/servicemonitor.yaml | 22 +++++------------ .../templates/data-coordinator/vpa.yaml | 14 ++++------- .../milvus/templates/data-node/configmap.yaml | 5 +--- .../templates/data-node/deployment.yaml | 17 +++++-------- .../templates/data-node/extra-configmap.yaml | 5 +--- bitnami/milvus/templates/data-node/hpa.yaml | 14 +++-------- .../templates/data-node/networkpolicy.yaml | 17 +++++-------- bitnami/milvus/templates/data-node/pdb.yaml | 8 +++---- .../templates/data-node/service-account.yaml | 16 ++++--------- .../milvus/templates/data-node/service.yaml | 18 ++++++-------- .../templates/data-node/servicemonitor.yaml | 22 +++++------------ bitnami/milvus/templates/data-node/vpa.yaml | 14 ++++------- .../milvus/templates/externaletcd-secret.yaml | 5 +--- .../templates/externalkafka-secret.yaml | 5 +--- .../milvus/templates/externals3-secret.yaml | 5 +--- bitnami/milvus/templates/extra-configmap.yaml | 5 +--- .../index-coordinator/configmap.yaml | 5 +--- .../index-coordinator/deployment.yaml | 17 +++++-------- .../index-coordinator/extra-configmap.yaml | 5 +--- .../templates/index-coordinator/hpa.yaml | 14 +++-------- .../index-coordinator/networkpolicy.yaml | 17 +++++-------- .../templates/index-coordinator/pdb.yaml | 8 +++---- .../index-coordinator/service-account.yaml | 16 ++++--------- .../templates/index-coordinator/service.yaml | 18 ++++++-------- .../index-coordinator/servicemonitor.yaml | 22 +++++------------ .../templates/index-coordinator/vpa.yaml | 14 ++++------- .../templates/index-node/configmap.yaml | 5 +--- .../templates/index-node/deployment.yaml | 17 +++++-------- .../templates/index-node/extra-configmap.yaml | 5 +--- bitnami/milvus/templates/index-node/hpa.yaml | 14 +++-------- .../templates/index-node/networkpolicy.yaml | 17 +++++-------- bitnami/milvus/templates/index-node/pdb.yaml | 8 +++---- .../templates/index-node/service-account.yaml | 16 ++++--------- .../milvus/templates/index-node/service.yaml | 18 ++++++-------- .../templates/index-node/servicemonitor.yaml | 22 +++++------------ bitnami/milvus/templates/index-node/vpa.yaml | 14 ++++------- bitnami/milvus/templates/init-job.yaml | 14 +++-------- bitnami/milvus/templates/proxy/configmap.yaml | 5 +--- .../milvus/templates/proxy/deployment.yaml | 17 +++++-------- .../templates/proxy/extra-configmap.yaml | 5 +--- bitnami/milvus/templates/proxy/hpa.yaml | 14 +++-------- .../milvus/templates/proxy/networkpolicy.yaml | 17 +++++-------- bitnami/milvus/templates/proxy/pdb.yaml | 8 +++---- .../templates/proxy/service-account.yaml | 16 ++++--------- bitnami/milvus/templates/proxy/service.yaml | 18 ++++++-------- .../templates/proxy/servicemonitor.yaml | 22 +++++------------ bitnami/milvus/templates/proxy/vpa.yaml | 14 ++++------- .../query-coordinator/configmap.yaml | 5 +--- .../query-coordinator/deployment.yaml | 17 +++++-------- .../query-coordinator/extra-configmap.yaml | 5 +--- .../templates/query-coordinator/hpa.yaml | 14 +++-------- .../query-coordinator/networkpolicy.yaml | 17 +++++-------- .../templates/query-coordinator/pdb.yaml | 8 +++---- .../query-coordinator/service-account.yaml | 16 ++++--------- .../templates/query-coordinator/service.yaml | 18 ++++++-------- .../query-coordinator/servicemonitor.yaml | 22 +++++------------ .../templates/query-coordinator/vpa.yaml | 14 ++++------- .../templates/query-node/configmap.yaml | 5 +--- .../templates/query-node/deployment.yaml | 17 +++++-------- .../templates/query-node/extra-configmap.yaml | 5 +--- bitnami/milvus/templates/query-node/hpa.yaml | 14 +++-------- .../templates/query-node/networkpolicy.yaml | 17 +++++-------- bitnami/milvus/templates/query-node/pdb.yaml | 8 +++---- .../templates/query-node/service-account.yaml | 16 ++++--------- .../milvus/templates/query-node/service.yaml | 18 ++++++-------- .../templates/query-node/servicemonitor.yaml | 22 +++++------------ bitnami/milvus/templates/query-node/vpa.yaml | 14 ++++------- .../templates/root-coordinator/configmap.yaml | 5 +--- .../root-coordinator/deployment.yaml | 17 +++++-------- .../root-coordinator/extra-configmap.yaml | 5 +--- .../templates/root-coordinator/hpa.yaml | 14 +++-------- .../root-coordinator/networkpolicy.yaml | 17 +++++-------- .../templates/root-coordinator/pdb.yaml | 8 +++---- .../root-coordinator/service-account.yaml | 16 ++++--------- .../templates/root-coordinator/service.yaml | 18 ++++++-------- .../root-coordinator/servicemonitor.yaml | 22 +++++------------ .../templates/root-coordinator/vpa.yaml | 14 ++++------- bitnami/milvus/templates/secret.yaml | 5 +--- 98 files changed, 389 insertions(+), 885 deletions(-) diff --git a/bitnami/milvus/Chart.lock b/bitnami/milvus/Chart.lock index 8b1eee1e15..dc1e784dd0 100644 --- a/bitnami/milvus/Chart.lock +++ b/bitnami/milvus/Chart.lock @@ -4,12 +4,12 @@ dependencies: version: 9.3.0 - name: kafka repository: oci://registry-1.docker.io/bitnamicharts - version: 25.0.1 + version: 25.1.0 - name: minio repository: oci://registry-1.docker.io/bitnamicharts version: 12.8.0 - name: common repository: oci://registry-1.docker.io/bitnamicharts version: 2.9.0 -digest: sha256:1598ca226145a2c584acda821afeccb7d29c0941eabd3cba28fef0b184a6c786 -generated: "2023-08-24T17:39:38.400078+02:00" +digest: sha256:4c9b5066930a90e963990086aaa3712da09aec219b2b4acf235fcc191923c0f7 +generated: "2023-08-25T08:15:42.08782+02:00" diff --git a/bitnami/milvus/Chart.yaml b/bitnami/milvus/Chart.yaml index 68a90a9a97..75940b3724 100644 --- a/bitnami/milvus/Chart.yaml +++ b/bitnami/milvus/Chart.yaml @@ -48,4 +48,4 @@ maintainers: name: milvus sources: - https://github.com/bitnami/charts/tree/main/bitnami/milvus -version: 3.0.0 +version: 3.1.0 diff --git a/bitnami/milvus/templates/attu/deployment.yaml b/bitnami/milvus/templates/attu/deployment.yaml index 82fa5e4be8..4e133fbccf 100644 --- a/bitnami/milvus/templates/attu/deployment.yaml +++ b/bitnami/milvus/templates/attu/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- 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 }} @@ -25,22 +22,19 @@ spec: {{- if .Values.attu.updateStrategy }} strategy: {{- toYaml .Values.attu.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.attu.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu template: metadata: - annotations: - {{- if .Values.attu.podAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.attu.podAnnotations "context" $) | nindent 8 }} - {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + {{- if .Values.attu.podAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.attu.podAnnotations "context" $) | nindent 8 }} + {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.attu.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.attu.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.attu.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -51,8 +45,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.attu.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.attu.podAffinityPreset "component" "attu" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.attu.podAntiAffinityPreset "component" "attu" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.attu.podAffinityPreset "component" "attu" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.attu.podAntiAffinityPreset "component" "attu" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.attu.nodeAffinityPreset.type "key" .Values.attu.nodeAffinityPreset.key "values" .Values.attu.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.attu.nodeSelector }} diff --git a/bitnami/milvus/templates/attu/hpa.yaml b/bitnami/milvus/templates/attu/hpa.yaml index 74d4b1ceab..6aeb127ae0 100644 --- a/bitnami/milvus/templates/attu/hpa.yaml +++ b/bitnami/milvus/templates/attu/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.attu.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.attu.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.attu.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.attu.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/attu/ingress-tls-secret.yaml b/bitnami/milvus/templates/attu/ingress-tls-secret.yaml index 44e15b778e..cc23c47c82 100644 --- a/bitnami/milvus/templates/attu/ingress-tls-secret.yaml +++ b/bitnami/milvus/templates/attu/ingress-tls-secret.yaml @@ -11,12 +11,9 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ include "common.names.namespace" $ | quote }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- 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 }} @@ -36,12 +33,9 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- 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 }} diff --git a/bitnami/milvus/templates/attu/ingress.yaml b/bitnami/milvus/templates/attu/ingress.yaml index 199329bcfb..c1ec96f11c 100644 --- a/bitnami/milvus/templates/attu/ingress.yaml +++ b/bitnami/milvus/templates/attu/ingress.yaml @@ -9,20 +9,12 @@ kind: Ingress metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.attu.ingress.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.attu.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.attu.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.attu.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if and .Values.attu.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/bitnami/milvus/templates/attu/networkpolicy.yaml b/bitnami/milvus/templates/attu/networkpolicy.yaml index 4e01cd38f1..c6798989b4 100644 --- a/bitnami/milvus/templates/attu/networkpolicy.yaml +++ b/bitnami/milvus/templates/attu/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- 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: + {{- $podLabels := merge .Values.attu.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: attu + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: attu policyTypes: - Ingress - Egress @@ -49,10 +47,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.attu.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.attu.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/attu/pdb.yaml b/bitnami/milvus/templates/attu/pdb.yaml index bd08d62c99..2712601ab8 100644 --- a/bitnami/milvus/templates/attu/pdb.yaml +++ b/bitnami/milvus/templates/attu/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.attu.pdb.maxUnavailable }} maxUnavailable: {{ .Values.attu.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.attu.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu {{- end }} diff --git a/bitnami/milvus/templates/attu/service-account.yaml b/bitnami/milvus/templates/attu/service-account.yaml index 4af8a1b2a9..7f62296f11 100644 --- a/bitnami/milvus/templates/attu/service-account.yaml +++ b/bitnami/milvus/templates/attu/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.attu.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.attu.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.attu.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.attu.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.attu.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.attu.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/attu/service.yaml b/bitnami/milvus/templates/attu/service.yaml index 4e6114c95f..7822a7f763 100644 --- a/bitnami/milvus/templates/attu/service.yaml +++ b/bitnami/milvus/templates/attu/service.yaml @@ -9,20 +9,12 @@ kind: Service metadata: name: {{ template "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.attu.service.annotations }} - annotations: - {{- if .Values.attu.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.attu.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.attu.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.attu.service.type }} @@ -57,7 +49,8 @@ spec: {{- if .Values.attu.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.attu.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.attu.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu {{- end }} diff --git a/bitnami/milvus/templates/attu/vpa.yaml b/bitnami/milvus/templates/attu/vpa.yaml index 33c9148182..58ae743570 100644 --- a/bitnami/milvus/templates/attu/vpa.yaml +++ b/bitnami/milvus/templates/attu/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.attu.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: attu - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.attu.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.attu.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.attu.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.attu.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/configmap.yaml b/bitnami/milvus/templates/configmap.yaml index 06de3f5120..52b59e92e1 100644 --- a/bitnami/milvus/templates/configmap.yaml +++ b/bitnami/milvus/templates/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/data-coordinator/configmap.yaml b/bitnami/milvus/templates/data-coordinator/configmap.yaml index 84423b15f6..2909085635 100644 --- a/bitnami/milvus/templates/data-coordinator/configmap.yaml +++ b/bitnami/milvus/templates/data-coordinator/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/data-coordinator/deployment.yaml b/bitnami/milvus/templates/data-coordinator/deployment.yaml index 5690ce69a9..a28de56bbb 100644 --- a/bitnami/milvus/templates/data-coordinator/deployment.yaml +++ b/bitnami/milvus/templates/data-coordinator/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.dataCoord.updateStrategy }} strategy: {{- toYaml .Values.dataCoord.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.dataCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator template: @@ -38,12 +36,9 @@ spec: {{- if .Values.dataCoord.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.dataCoord.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.data-coordinator.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataCoord.podAffinityPreset "component" "data-coordinator" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataCoord.podAntiAffinityPreset "component" "data-coordinator" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataCoord.podAffinityPreset "component" "data-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataCoord.podAntiAffinityPreset "component" "data-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.dataCoord.nodeAffinityPreset.type "key" .Values.dataCoord.nodeAffinityPreset.key "values" .Values.dataCoord.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.dataCoord.nodeSelector }} diff --git a/bitnami/milvus/templates/data-coordinator/extra-configmap.yaml b/bitnami/milvus/templates/data-coordinator/extra-configmap.yaml index 10925dc525..c51a34d3a9 100644 --- a/bitnami/milvus/templates/data-coordinator/extra-configmap.yaml +++ b/bitnami/milvus/templates/data-coordinator/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.data-coordinator.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- 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 }} diff --git a/bitnami/milvus/templates/data-coordinator/hpa.yaml b/bitnami/milvus/templates/data-coordinator/hpa.yaml index bbefbe7a72..30875d5ae8 100644 --- a/bitnami/milvus/templates/data-coordinator/hpa.yaml +++ b/bitnami/milvus/templates/data-coordinator/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.dataCoord.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.dataCoord.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.dataCoord.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/data-coordinator/networkpolicy.yaml b/bitnami/milvus/templates/data-coordinator/networkpolicy.yaml index 6f18ca7313..8648ceb2f3 100644 --- a/bitnami/milvus/templates/data-coordinator/networkpolicy.yaml +++ b/bitnami/milvus/templates/data-coordinator/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- 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: + {{- $podLabels := merge .Values.dataCoord.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: data-coordinator + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: data-coordinator policyTypes: - Ingress - Egress @@ -51,10 +49,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.dataCoord.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/data-coordinator/pdb.yaml b/bitnami/milvus/templates/data-coordinator/pdb.yaml index 7d278415da..114e92f336 100644 --- a/bitnami/milvus/templates/data-coordinator/pdb.yaml +++ b/bitnami/milvus/templates/data-coordinator/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.dataCoord.pdb.maxUnavailable }} maxUnavailable: {{ .Values.dataCoord.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.dataCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator {{- end }} diff --git a/bitnami/milvus/templates/data-coordinator/service-account.yaml b/bitnami/milvus/templates/data-coordinator/service-account.yaml index 9301a2877c..77b2b32344 100644 --- a/bitnami/milvus/templates/data-coordinator/service-account.yaml +++ b/bitnami/milvus/templates/data-coordinator/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.data-coordinator.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataCoord.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.dataCoord.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataCoord.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.dataCoord.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/data-coordinator/service.yaml b/bitnami/milvus/templates/data-coordinator/service.yaml index 36595246d1..242b887f4c 100644 --- a/bitnami/milvus/templates/data-coordinator/service.yaml +++ b/bitnami/milvus/templates/data-coordinator/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.dataCoord.service.annotations }} + {{- if or .Values.commonAnnotations .Values.dataCoord.service.annotations (and .Values.dataCoord.metrics.enabled .Values.dataCoord.metrics.annotations) }} annotations: - {{- if .Values.dataCoord.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.dataCoord.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataCoord.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.dataCoord.metrics.enabled .Values.dataCoord.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.dataCoord.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.dataCoord.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator {{- end }} diff --git a/bitnami/milvus/templates/data-coordinator/servicemonitor.yaml b/bitnami/milvus/templates/data-coordinator/servicemonitor.yaml index f390fcf1a0..c095654452 100644 --- a/bitnami/milvus/templates/data-coordinator/servicemonitor.yaml +++ b/bitnami/milvus/templates/data-coordinator/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.data-coordinator.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.dataCoord.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.dataCoord.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataCoord.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.dataCoord.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataCoord.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.dataCoord.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.dataCoord.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.dataCoord.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.dataCoord.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.dataCoord.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.dataCoord.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/data-coordinator/vpa.yaml b/bitnami/milvus/templates/data-coordinator/vpa.yaml index a7ec41bc6b..c29a7ca91e 100644 --- a/bitnami/milvus/templates/data-coordinator/vpa.yaml +++ b/bitnami/milvus/templates/data-coordinator/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.data-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataCoord.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataCoord.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.dataCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/data-node/configmap.yaml b/bitnami/milvus/templates/data-node/configmap.yaml index a427a8616b..7e9357e22a 100644 --- a/bitnami/milvus/templates/data-node/configmap.yaml +++ b/bitnami/milvus/templates/data-node/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/data-node/deployment.yaml b/bitnami/milvus/templates/data-node/deployment.yaml index b8ff7770b9..764174ba68 100644 --- a/bitnami/milvus/templates/data-node/deployment.yaml +++ b/bitnami/milvus/templates/data-node/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.dataNode.updateStrategy }} strategy: {{- toYaml .Values.dataNode.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.dataNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node template: @@ -38,12 +36,9 @@ spec: {{- if .Values.dataNode.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.dataNode.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.dataNode.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.dataNode.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.data-node.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataNode.podAffinityPreset "component" "data-node" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataNode.podAntiAffinityPreset "component" "data-node" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataNode.podAffinityPreset "component" "data-node" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dataNode.podAntiAffinityPreset "component" "data-node" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.dataNode.nodeAffinityPreset.type "key" .Values.dataNode.nodeAffinityPreset.key "values" .Values.dataNode.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.dataNode.nodeSelector }} diff --git a/bitnami/milvus/templates/data-node/extra-configmap.yaml b/bitnami/milvus/templates/data-node/extra-configmap.yaml index 769f75eeca..f3885ea587 100644 --- a/bitnami/milvus/templates/data-node/extra-configmap.yaml +++ b/bitnami/milvus/templates/data-node/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.data-node.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- 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 }} diff --git a/bitnami/milvus/templates/data-node/hpa.yaml b/bitnami/milvus/templates/data-node/hpa.yaml index 6739c8c833..cdeee17f07 100644 --- a/bitnami/milvus/templates/data-node/hpa.yaml +++ b/bitnami/milvus/templates/data-node/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.dataNode.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.dataNode.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.dataNode.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/data-node/networkpolicy.yaml b/bitnami/milvus/templates/data-node/networkpolicy.yaml index d5d014c104..ea01905ce0 100644 --- a/bitnami/milvus/templates/data-node/networkpolicy.yaml +++ b/bitnami/milvus/templates/data-node/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- 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: + {{- $podLabels := merge .Values.dataNode.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: data-node + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: data-node policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.dataNode.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/data-node/pdb.yaml b/bitnami/milvus/templates/data-node/pdb.yaml index fe4e948c06..dd9ef0e390 100644 --- a/bitnami/milvus/templates/data-node/pdb.yaml +++ b/bitnami/milvus/templates/data-node/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.dataNode.pdb.maxUnavailable }} maxUnavailable: {{ .Values.dataNode.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.dataNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node {{- end }} diff --git a/bitnami/milvus/templates/data-node/service-account.yaml b/bitnami/milvus/templates/data-node/service-account.yaml index fa87a1b30e..e2ec802ef6 100644 --- a/bitnami/milvus/templates/data-node/service-account.yaml +++ b/bitnami/milvus/templates/data-node/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.data-node.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataNode.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.dataNode.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataNode.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.dataNode.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/data-node/service.yaml b/bitnami/milvus/templates/data-node/service.yaml index cd57a00091..44fce7aa97 100644 --- a/bitnami/milvus/templates/data-node/service.yaml +++ b/bitnami/milvus/templates/data-node/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.dataNode.service.annotations }} + {{- if or .Values.commonAnnotations .Values.dataNode.service.annotations (and .Values.dataNode.metrics.enabled .Values.dataNode.metrics.annotations) }} annotations: - {{- if .Values.dataNode.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.dataNode.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataNode.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.dataNode.metrics.enabled .Values.dataNode.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.dataNode.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.dataNode.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.dataNode.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node {{- end }} diff --git a/bitnami/milvus/templates/data-node/servicemonitor.yaml b/bitnami/milvus/templates/data-node/servicemonitor.yaml index 752b340b80..f384b5b192 100644 --- a/bitnami/milvus/templates/data-node/servicemonitor.yaml +++ b/bitnami/milvus/templates/data-node/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.data-node.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.dataNode.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.dataNode.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataNode.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.dataNode.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataNode.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.dataNode.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.dataNode.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.dataNode.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.dataNode.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.dataNode.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.dataNode.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/data-node/vpa.yaml b/bitnami/milvus/templates/data-node/vpa.yaml index eda8976825..bfc5c27be8 100644 --- a/bitnami/milvus/templates/data-node/vpa.yaml +++ b/bitnami/milvus/templates/data-node/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.data-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: data-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.dataNode.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dataNode.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.dataNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dataNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/externaletcd-secret.yaml b/bitnami/milvus/templates/externaletcd-secret.yaml index 8f2f22119e..893096510b 100644 --- a/bitnami/milvus/templates/externaletcd-secret.yaml +++ b/bitnami/milvus/templates/externaletcd-secret.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ printf "%s-external-etcd" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/externalkafka-secret.yaml b/bitnami/milvus/templates/externalkafka-secret.yaml index dae87e08e8..f4bdbe77d5 100644 --- a/bitnami/milvus/templates/externalkafka-secret.yaml +++ b/bitnami/milvus/templates/externalkafka-secret.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ printf "%s-external-kafka" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/externals3-secret.yaml b/bitnami/milvus/templates/externals3-secret.yaml index 8f4c0b5a9b..8d72424536 100644 --- a/bitnami/milvus/templates/externals3-secret.yaml +++ b/bitnami/milvus/templates/externals3-secret.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ printf "%s-externals3" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: mivus - {{- 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 }} diff --git a/bitnami/milvus/templates/extra-configmap.yaml b/bitnami/milvus/templates/extra-configmap.yaml index 387c7c3271..930ebeb544 100644 --- a/bitnami/milvus/templates/extra-configmap.yaml +++ b/bitnami/milvus/templates/extra-configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/index-coordinator/configmap.yaml b/bitnami/milvus/templates/index-coordinator/configmap.yaml index 485b310c4e..695bded7cc 100644 --- a/bitnami/milvus/templates/index-coordinator/configmap.yaml +++ b/bitnami/milvus/templates/index-coordinator/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/index-coordinator/deployment.yaml b/bitnami/milvus/templates/index-coordinator/deployment.yaml index 8d20079e38..c50df8022c 100644 --- a/bitnami/milvus/templates/index-coordinator/deployment.yaml +++ b/bitnami/milvus/templates/index-coordinator/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.indexCoord.updateStrategy }} strategy: {{- toYaml .Values.indexCoord.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.indexCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator template: @@ -38,12 +36,9 @@ spec: {{- if .Values.indexCoord.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.indexCoord.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.indexCoord.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.indexCoord.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.index-coordinator.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexCoord.podAffinityPreset "component" "index-coordinator" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexCoord.podAntiAffinityPreset "component" "index-coordinator" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexCoord.podAffinityPreset "component" "index-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexCoord.podAntiAffinityPreset "component" "index-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.indexCoord.nodeAffinityPreset.type "key" .Values.indexCoord.nodeAffinityPreset.key "values" .Values.indexCoord.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.indexCoord.nodeSelector }} diff --git a/bitnami/milvus/templates/index-coordinator/extra-configmap.yaml b/bitnami/milvus/templates/index-coordinator/extra-configmap.yaml index c9f73ada92..985c3fbbef 100644 --- a/bitnami/milvus/templates/index-coordinator/extra-configmap.yaml +++ b/bitnami/milvus/templates/index-coordinator/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.index-coordinator.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- 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 }} diff --git a/bitnami/milvus/templates/index-coordinator/hpa.yaml b/bitnami/milvus/templates/index-coordinator/hpa.yaml index c0e18163d7..46cec6d00c 100644 --- a/bitnami/milvus/templates/index-coordinator/hpa.yaml +++ b/bitnami/milvus/templates/index-coordinator/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.indexCoord.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.indexCoord.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.indexCoord.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/index-coordinator/networkpolicy.yaml b/bitnami/milvus/templates/index-coordinator/networkpolicy.yaml index e381d03c53..79ada69122 100644 --- a/bitnami/milvus/templates/index-coordinator/networkpolicy.yaml +++ b/bitnami/milvus/templates/index-coordinator/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- 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: + {{- $podLabels := merge .Values.indexCoord.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: index-coordinator + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: index-coordinator policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.indexCoord.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/index-coordinator/pdb.yaml b/bitnami/milvus/templates/index-coordinator/pdb.yaml index e797c1e5cd..6457e8d3c1 100644 --- a/bitnami/milvus/templates/index-coordinator/pdb.yaml +++ b/bitnami/milvus/templates/index-coordinator/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.indexCoord.pdb.maxUnavailable }} maxUnavailable: {{ .Values.indexCoord.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.indexCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator {{- end }} diff --git a/bitnami/milvus/templates/index-coordinator/service-account.yaml b/bitnami/milvus/templates/index-coordinator/service-account.yaml index ac32db7613..8443b01b97 100644 --- a/bitnami/milvus/templates/index-coordinator/service-account.yaml +++ b/bitnami/milvus/templates/index-coordinator/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.index-coordinator.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexCoord.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.indexCoord.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indexCoord.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.indexCoord.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/index-coordinator/service.yaml b/bitnami/milvus/templates/index-coordinator/service.yaml index 2537c34e49..0af26204e2 100644 --- a/bitnami/milvus/templates/index-coordinator/service.yaml +++ b/bitnami/milvus/templates/index-coordinator/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.indexCoord.service.annotations }} + {{- if or .Values.commonAnnotations .Values.indexCoord.service.annotations (and .Values.indexCoord.metrics.enabled .Values.indexCoord.metrics.annotations) }} annotations: - {{- if .Values.indexCoord.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.indexCoord.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indexCoord.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.indexCoord.metrics.enabled .Values.indexCoord.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.indexCoord.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.indexCoord.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.indexCoord.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator {{- end }} diff --git a/bitnami/milvus/templates/index-coordinator/servicemonitor.yaml b/bitnami/milvus/templates/index-coordinator/servicemonitor.yaml index a3fb5c3def..74bc3b5c01 100644 --- a/bitnami/milvus/templates/index-coordinator/servicemonitor.yaml +++ b/bitnami/milvus/templates/index-coordinator/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.index-coordinator.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.indexCoord.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.indexCoord.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexCoord.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.indexCoord.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexCoord.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.indexCoord.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.indexCoord.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.indexCoord.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.indexCoord.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.indexCoord.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.indexCoord.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/index-coordinator/vpa.yaml b/bitnami/milvus/templates/index-coordinator/vpa.yaml index 2de2ad119e..bc2d931531 100644 --- a/bitnami/milvus/templates/index-coordinator/vpa.yaml +++ b/bitnami/milvus/templates/index-coordinator/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.index-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexCoord.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexCoord.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.indexCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indexCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/index-node/configmap.yaml b/bitnami/milvus/templates/index-node/configmap.yaml index bf4cfb92c8..7bf5b57815 100644 --- a/bitnami/milvus/templates/index-node/configmap.yaml +++ b/bitnami/milvus/templates/index-node/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/index-node/deployment.yaml b/bitnami/milvus/templates/index-node/deployment.yaml index 2a44b02e14..6f9c437870 100644 --- a/bitnami/milvus/templates/index-node/deployment.yaml +++ b/bitnami/milvus/templates/index-node/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.indexNode.updateStrategy }} strategy: {{- toYaml .Values.indexNode.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.indexNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node template: @@ -38,12 +36,9 @@ spec: {{- if .Values.indexNode.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.indexNode.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.indexNode.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.indexNode.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.index-node.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexNode.podAffinityPreset "component" "index-node" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexNode.podAntiAffinityPreset "component" "index-node" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexNode.podAffinityPreset "component" "index-node" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.indexNode.podAntiAffinityPreset "component" "index-node" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.indexNode.nodeAffinityPreset.type "key" .Values.indexNode.nodeAffinityPreset.key "values" .Values.indexNode.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.indexNode.nodeSelector }} diff --git a/bitnami/milvus/templates/index-node/extra-configmap.yaml b/bitnami/milvus/templates/index-node/extra-configmap.yaml index 32f21c50be..188f959241 100644 --- a/bitnami/milvus/templates/index-node/extra-configmap.yaml +++ b/bitnami/milvus/templates/index-node/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.index-node.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- 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 }} diff --git a/bitnami/milvus/templates/index-node/hpa.yaml b/bitnami/milvus/templates/index-node/hpa.yaml index 2ba0fb1a84..353a55e690 100644 --- a/bitnami/milvus/templates/index-node/hpa.yaml +++ b/bitnami/milvus/templates/index-node/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.indexNode.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.indexNode.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.indexNode.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/index-node/networkpolicy.yaml b/bitnami/milvus/templates/index-node/networkpolicy.yaml index 69c39125fd..8e0eb0e9d5 100644 --- a/bitnami/milvus/templates/index-node/networkpolicy.yaml +++ b/bitnami/milvus/templates/index-node/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- 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: + {{- $podLabels := merge .Values.indexNode.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: index-node + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: index-node policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.indexNode.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/index-node/pdb.yaml b/bitnami/milvus/templates/index-node/pdb.yaml index 6c5424f6e5..c6ac3a00f7 100644 --- a/bitnami/milvus/templates/index-node/pdb.yaml +++ b/bitnami/milvus/templates/index-node/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.indexNode.pdb.maxUnavailable }} maxUnavailable: {{ .Values.indexNode.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.indexNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node {{- end }} diff --git a/bitnami/milvus/templates/index-node/service-account.yaml b/bitnami/milvus/templates/index-node/service-account.yaml index 8611b0740a..5d432ad88e 100644 --- a/bitnami/milvus/templates/index-node/service-account.yaml +++ b/bitnami/milvus/templates/index-node/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.index-node.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexNode.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.indexNode.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indexNode.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.indexNode.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/index-node/service.yaml b/bitnami/milvus/templates/index-node/service.yaml index 80992a470b..8c5dbde45d 100644 --- a/bitnami/milvus/templates/index-node/service.yaml +++ b/bitnami/milvus/templates/index-node/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.indexNode.service.annotations }} + {{- if or .Values.commonAnnotations .Values.indexNode.service.annotations (and .Values.indexNode.metrics.enabled .Values.indexNode.metrics.annotations) }} annotations: - {{- if .Values.indexNode.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.indexNode.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indeindexNodexCoord.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.indexNode.metrics.enabled .Values.indexNode.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.indexNode.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.indexNode.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.indexNode.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node {{- end }} diff --git a/bitnami/milvus/templates/index-node/servicemonitor.yaml b/bitnami/milvus/templates/index-node/servicemonitor.yaml index 684aa61a68..a824eb62e3 100644 --- a/bitnami/milvus/templates/index-node/servicemonitor.yaml +++ b/bitnami/milvus/templates/index-node/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.index-node.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.indexNode.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.indexNode.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexNode.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.indexNode.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexNode.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.indexNode.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.indexNode.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.indexNode.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.indexNode.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.indexNode.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.indexNode.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/index-node/vpa.yaml b/bitnami/milvus/templates/index-node/vpa.yaml index 00d37b22d0..32bc2831c2 100644 --- a/bitnami/milvus/templates/index-node/vpa.yaml +++ b/bitnami/milvus/templates/index-node/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.index-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: index-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.indexNode.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.indexNode.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.indexNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.indexNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/init-job.yaml b/bitnami/milvus/templates/init-job.yaml index 9dce1ee33f..5c55347cf0 100644 --- a/bitnami/milvus/templates/init-job.yaml +++ b/bitnami/milvus/templates/init-job.yaml @@ -9,11 +9,8 @@ kind: Job metadata: name: {{ include "common.names.fullname" . }}-init namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.initJob.annotations "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -22,14 +19,9 @@ spec: backoffLimit: {{ .Values.initJob.backoffLimit }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + {{- $podLabels := merge .Values.initJob.podLabels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: init - {{- if .Values.initJob.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.initJob.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} {{- if .Values.initJob.podAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.initJob.podAnnotations "context" $) | nindent 8 }} {{- end }} diff --git a/bitnami/milvus/templates/proxy/configmap.yaml b/bitnami/milvus/templates/proxy/configmap.yaml index 2806146ad6..2d901f97c0 100644 --- a/bitnami/milvus/templates/proxy/configmap.yaml +++ b/bitnami/milvus/templates/proxy/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/proxy/deployment.yaml b/bitnami/milvus/templates/proxy/deployment.yaml index a1f991462a..925e1da75a 100644 --- a/bitnami/milvus/templates/proxy/deployment.yaml +++ b/bitnami/milvus/templates/proxy/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.proxy.updateStrategy }} strategy: {{- toYaml .Values.proxy.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.proxy.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy template: @@ -38,12 +36,9 @@ spec: {{- if .Values.proxy.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.proxy.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.proxy.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.proxy.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.proxy.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.proxy.podAffinityPreset "component" "proxy" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.proxy.podAntiAffinityPreset "component" "proxy" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.proxy.podAffinityPreset "component" "proxy" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.proxy.podAntiAffinityPreset "component" "proxy" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.proxy.nodeAffinityPreset.type "key" .Values.proxy.nodeAffinityPreset.key "values" .Values.proxy.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.proxy.nodeSelector }} diff --git a/bitnami/milvus/templates/proxy/extra-configmap.yaml b/bitnami/milvus/templates/proxy/extra-configmap.yaml index 2fd83930a1..6cfce52a44 100644 --- a/bitnami/milvus/templates/proxy/extra-configmap.yaml +++ b/bitnami/milvus/templates/proxy/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.proxy.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- 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 }} diff --git a/bitnami/milvus/templates/proxy/hpa.yaml b/bitnami/milvus/templates/proxy/hpa.yaml index 23a2e51574..c854c659bc 100644 --- a/bitnami/milvus/templates/proxy/hpa.yaml +++ b/bitnami/milvus/templates/proxy/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.proxy.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.proxy.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.proxy.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/proxy/networkpolicy.yaml b/bitnami/milvus/templates/proxy/networkpolicy.yaml index 352e2c08c8..41f5d52a54 100644 --- a/bitnami/milvus/templates/proxy/networkpolicy.yaml +++ b/bitnami/milvus/templates/proxy/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- 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: + {{- $podLabels := merge .Values.proxy.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: proxy + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: proxy policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.proxy.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/proxy/pdb.yaml b/bitnami/milvus/templates/proxy/pdb.yaml index 2bcd5cc77e..d988271dfe 100644 --- a/bitnami/milvus/templates/proxy/pdb.yaml +++ b/bitnami/milvus/templates/proxy/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.proxy.pdb.maxUnavailable }} maxUnavailable: {{ .Values.proxy.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.proxy.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy {{- end }} diff --git a/bitnami/milvus/templates/proxy/service-account.yaml b/bitnami/milvus/templates/proxy/service-account.yaml index e9018db2eb..2db7f3b3cd 100644 --- a/bitnami/milvus/templates/proxy/service-account.yaml +++ b/bitnami/milvus/templates/proxy/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.proxy.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.proxy.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.proxy.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.proxy.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.proxy.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/proxy/service.yaml b/bitnami/milvus/templates/proxy/service.yaml index 942b2e5d73..67bd90459c 100644 --- a/bitnami/milvus/templates/proxy/service.yaml +++ b/bitnami/milvus/templates/proxy/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.proxy.service.annotations }} + {{- if or .Values.commonAnnotations .Values.proxy.service.annotations (and .Values.proxy.metrics.enabled .Values.proxy.metrics.annotations) }} annotations: - {{- if .Values.proxy.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.proxy.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.proxy.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.proxy.metrics.enabled .Values.proxy.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.proxy.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.proxy.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.proxy.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy {{- end }} diff --git a/bitnami/milvus/templates/proxy/servicemonitor.yaml b/bitnami/milvus/templates/proxy/servicemonitor.yaml index 7fe5b4b3b9..fa01068446 100644 --- a/bitnami/milvus/templates/proxy/servicemonitor.yaml +++ b/bitnami/milvus/templates/proxy/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.proxy.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.proxy.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.proxy.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.proxy.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.proxy.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.proxy.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.proxy.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.proxy.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.proxy.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.proxy.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.proxy.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.proxy.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/proxy/vpa.yaml b/bitnami/milvus/templates/proxy/vpa.yaml index c708e62d69..a9b50d9645 100644 --- a/bitnami/milvus/templates/proxy/vpa.yaml +++ b/bitnami/milvus/templates/proxy/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.proxy.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: proxy - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.proxy.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.proxy.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.proxy.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.proxy.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/query-coordinator/configmap.yaml b/bitnami/milvus/templates/query-coordinator/configmap.yaml index 1a774673f5..68f84d44b6 100644 --- a/bitnami/milvus/templates/query-coordinator/configmap.yaml +++ b/bitnami/milvus/templates/query-coordinator/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/query-coordinator/deployment.yaml b/bitnami/milvus/templates/query-coordinator/deployment.yaml index 830c155a30..5dcb87cea5 100644 --- a/bitnami/milvus/templates/query-coordinator/deployment.yaml +++ b/bitnami/milvus/templates/query-coordinator/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.queryCoord.updateStrategy }} strategy: {{- toYaml .Values.queryCoord.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.queryCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator template: @@ -38,12 +36,9 @@ spec: {{- if .Values.queryCoord.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.queryCoord.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.queryCoord.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.queryCoord.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.query-coordinator.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryCoord.podAffinityPreset "component" "query-coordinator" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryCoord.podAntiAffinityPreset "component" "query-coordinator" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryCoord.podAffinityPreset "component" "query-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryCoord.podAntiAffinityPreset "component" "query-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.queryCoord.nodeAffinityPreset.type "key" .Values.queryCoord.nodeAffinityPreset.key "values" .Values.queryCoord.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.queryCoord.nodeSelector }} diff --git a/bitnami/milvus/templates/query-coordinator/extra-configmap.yaml b/bitnami/milvus/templates/query-coordinator/extra-configmap.yaml index 9e5c9021f4..b76b9c82e6 100644 --- a/bitnami/milvus/templates/query-coordinator/extra-configmap.yaml +++ b/bitnami/milvus/templates/query-coordinator/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.query-coordinator.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- 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 }} diff --git a/bitnami/milvus/templates/query-coordinator/hpa.yaml b/bitnami/milvus/templates/query-coordinator/hpa.yaml index 396a057a8c..053ae25688 100644 --- a/bitnami/milvus/templates/query-coordinator/hpa.yaml +++ b/bitnami/milvus/templates/query-coordinator/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.queryCoord.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.queryCoord.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.queryCoord.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/query-coordinator/networkpolicy.yaml b/bitnami/milvus/templates/query-coordinator/networkpolicy.yaml index f0b0832402..e6dda3abfe 100644 --- a/bitnami/milvus/templates/query-coordinator/networkpolicy.yaml +++ b/bitnami/milvus/templates/query-coordinator/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- 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: + {{- $podLabels := merge .Values.queryCoord.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: query-coordinator + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: query-coordinator policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.queryCoord.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/query-coordinator/pdb.yaml b/bitnami/milvus/templates/query-coordinator/pdb.yaml index 4d30f03bea..47f46b245f 100644 --- a/bitnami/milvus/templates/query-coordinator/pdb.yaml +++ b/bitnami/milvus/templates/query-coordinator/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.queryCoord.pdb.maxUnavailable }} maxUnavailable: {{ .Values.queryCoord.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.queryCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator {{- end }} diff --git a/bitnami/milvus/templates/query-coordinator/service-account.yaml b/bitnami/milvus/templates/query-coordinator/service-account.yaml index b170efff2a..3e5e7e629b 100644 --- a/bitnami/milvus/templates/query-coordinator/service-account.yaml +++ b/bitnami/milvus/templates/query-coordinator/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.query-coordinator.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryCoord.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.queryCoord.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryCoord.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.queryCoord.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/query-coordinator/service.yaml b/bitnami/milvus/templates/query-coordinator/service.yaml index d8c29c8d74..ca7d48f4ea 100644 --- a/bitnami/milvus/templates/query-coordinator/service.yaml +++ b/bitnami/milvus/templates/query-coordinator/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.queryCoord.service.annotations }} + {{- if or .Values.commonAnnotations .Values.queryCoord.service.annotations (and .Values.queryCoord.metrics.enabled .Values.queryCoord.metrics.annotations) }} annotations: - {{- if .Values.queryCoord.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.queryCoord.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryCoord.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.queryCoord.metrics.enabled .Values.queryCoord.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.queryCoord.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.queryCoord.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.queryCoord.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator {{- end }} diff --git a/bitnami/milvus/templates/query-coordinator/servicemonitor.yaml b/bitnami/milvus/templates/query-coordinator/servicemonitor.yaml index 002dbb636f..010ffe5045 100644 --- a/bitnami/milvus/templates/query-coordinator/servicemonitor.yaml +++ b/bitnami/milvus/templates/query-coordinator/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.query-coordinator.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.queryCoord.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.queryCoord.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryCoord.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.queryCoord.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryCoord.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.queryCoord.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.queryCoord.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.queryCoord.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.queryCoord.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.queryCoord.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.queryCoord.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/query-coordinator/vpa.yaml b/bitnami/milvus/templates/query-coordinator/vpa.yaml index c473561409..d9e9093945 100644 --- a/bitnami/milvus/templates/query-coordinator/vpa.yaml +++ b/bitnami/milvus/templates/query-coordinator/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.query-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryCoord.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryCoord.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.queryCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/query-node/configmap.yaml b/bitnami/milvus/templates/query-node/configmap.yaml index 74c0c4ab39..df6aca541f 100644 --- a/bitnami/milvus/templates/query-node/configmap.yaml +++ b/bitnami/milvus/templates/query-node/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/query-node/deployment.yaml b/bitnami/milvus/templates/query-node/deployment.yaml index 24178e9b8f..5d4faf8fb5 100644 --- a/bitnami/milvus/templates/query-node/deployment.yaml +++ b/bitnami/milvus/templates/query-node/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.queryNode.updateStrategy }} strategy: {{- toYaml .Values.queryNode.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.queryNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node template: @@ -38,12 +36,9 @@ spec: {{- if .Values.queryNode.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.queryNode.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.queryNode.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.queryNode.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.query-node.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryNode.podAffinityPreset "component" "query-node" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryNode.podAntiAffinityPreset "component" "query-node" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryNode.podAffinityPreset "component" "query-node" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.queryNode.podAntiAffinityPreset "component" "query-node" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.queryNode.nodeAffinityPreset.type "key" .Values.queryNode.nodeAffinityPreset.key "values" .Values.queryNode.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.queryNode.nodeSelector }} diff --git a/bitnami/milvus/templates/query-node/extra-configmap.yaml b/bitnami/milvus/templates/query-node/extra-configmap.yaml index c553e6aa0a..0fccb83717 100644 --- a/bitnami/milvus/templates/query-node/extra-configmap.yaml +++ b/bitnami/milvus/templates/query-node/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.query-node.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- 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 }} diff --git a/bitnami/milvus/templates/query-node/hpa.yaml b/bitnami/milvus/templates/query-node/hpa.yaml index 163b04778b..15dcc4c171 100644 --- a/bitnami/milvus/templates/query-node/hpa.yaml +++ b/bitnami/milvus/templates/query-node/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.queryNode.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.queryNode.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.queryNode.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/query-node/networkpolicy.yaml b/bitnami/milvus/templates/query-node/networkpolicy.yaml index c76dfb69c2..2950b26787 100644 --- a/bitnami/milvus/templates/query-node/networkpolicy.yaml +++ b/bitnami/milvus/templates/query-node/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- 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: + {{- $podLabels := merge .Values.queryNode.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: query-node + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: query-node policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.queryNode.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/query-node/pdb.yaml b/bitnami/milvus/templates/query-node/pdb.yaml index e3229d624d..441e923b8f 100644 --- a/bitnami/milvus/templates/query-node/pdb.yaml +++ b/bitnami/milvus/templates/query-node/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.queryNode.pdb.maxUnavailable }} maxUnavailable: {{ .Values.queryNode.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.queryNode.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node {{- end }} diff --git a/bitnami/milvus/templates/query-node/service-account.yaml b/bitnami/milvus/templates/query-node/service-account.yaml index 57c98c6707..1cbd4a8cf7 100644 --- a/bitnami/milvus/templates/query-node/service-account.yaml +++ b/bitnami/milvus/templates/query-node/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.query-node.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryNode.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.queryNode.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryNode.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.queryNode.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/query-node/service.yaml b/bitnami/milvus/templates/query-node/service.yaml index d517bb05a5..e594622f79 100644 --- a/bitnami/milvus/templates/query-node/service.yaml +++ b/bitnami/milvus/templates/query-node/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.queryNode.service.annotations }} + {{- if or .Values.commonAnnotations .Values.queryNode.service.annotations (and .Values.queryNode.metrics.enabled .Values.queryNode.metrics.annotations) }} annotations: - {{- if .Values.queryNode.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.queryNode.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryNode.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.queryNode.metrics.enabled .Values.queryNode.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.queryNode.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.queryNode.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.queryNode.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node {{- end }} diff --git a/bitnami/milvus/templates/query-node/servicemonitor.yaml b/bitnami/milvus/templates/query-node/servicemonitor.yaml index 8678f43d62..fcf3767ddc 100644 --- a/bitnami/milvus/templates/query-node/servicemonitor.yaml +++ b/bitnami/milvus/templates/query-node/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.query-node.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.queryNode.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.queryNode.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryNode.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.queryNode.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryNode.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.queryNode.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.queryNode.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.queryNode.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.queryNode.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.queryNode.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.queryNode.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/query-node/vpa.yaml b/bitnami/milvus/templates/query-node/vpa.yaml index 3b532350cd..308e01e5a4 100644 --- a/bitnami/milvus/templates/query-node/vpa.yaml +++ b/bitnami/milvus/templates/query-node/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.query-node.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: query-node - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.queryNode.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.queryNode.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.queryNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.queryNode.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/root-coordinator/configmap.yaml b/bitnami/milvus/templates/root-coordinator/configmap.yaml index d5846be9e8..ba76ec768a 100644 --- a/bitnami/milvus/templates/root-coordinator/configmap.yaml +++ b/bitnami/milvus/templates/root-coordinator/configmap.yaml @@ -9,11 +9,8 @@ kind: ConfigMap metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }} diff --git a/bitnami/milvus/templates/root-coordinator/deployment.yaml b/bitnami/milvus/templates/root-coordinator/deployment.yaml index fe3e1aff36..e72ac5a492 100644 --- a/bitnami/milvus/templates/root-coordinator/deployment.yaml +++ b/bitnami/milvus/templates/root-coordinator/deployment.yaml @@ -9,12 +9,9 @@ kind: Deployment metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.rootCoord.updateStrategy }} strategy: {{- toYaml .Values.rootCoord.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.rootCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator template: @@ -38,12 +36,9 @@ spec: {{- if .Values.rootCoord.podAnnotations }} {{- include "common.tplvalues.render" (dict "value" .Values.rootCoord.podAnnotations "context" $) | nindent 8 }} {{- end }} - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.rootCoord.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.rootCoord.podLabels "context" $) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "milvus.root-coordinator.serviceAccountName" . }} {{- include "milvus.imagePullSecrets" . | nindent 6 }} @@ -54,8 +49,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.rootCoord.podAffinityPreset "component" "root-coordinator" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.rootCoord.podAntiAffinityPreset "component" "root-coordinator" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.rootCoord.podAffinityPreset "component" "root-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.rootCoord.podAntiAffinityPreset "component" "root-coordinator" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.rootCoord.nodeAffinityPreset.type "key" .Values.rootCoord.nodeAffinityPreset.key "values" .Values.rootCoord.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.rootCoord.nodeSelector }} diff --git a/bitnami/milvus/templates/root-coordinator/extra-configmap.yaml b/bitnami/milvus/templates/root-coordinator/extra-configmap.yaml index 6a2862d46d..6d1f2d5e70 100644 --- a/bitnami/milvus/templates/root-coordinator/extra-configmap.yaml +++ b/bitnami/milvus/templates/root-coordinator/extra-configmap.yaml @@ -9,12 +9,9 @@ kind: ConfigMap metadata: name: {{ printf "%s-extra" (include "milvus.root-coordinator.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- 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 }} diff --git a/bitnami/milvus/templates/root-coordinator/hpa.yaml b/bitnami/milvus/templates/root-coordinator/hpa.yaml index 7970a2b3fb..607736d35b 100644 --- a/bitnami/milvus/templates/root-coordinator/hpa.yaml +++ b/bitnami/milvus/templates/root-coordinator/hpa.yaml @@ -9,20 +9,12 @@ kind: HorizontalPodAutoscaler metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.commonAnnotations .Values.rootCoord.autoscaling.hpa.annotations }} - annotations: - {{- if .Values.rootCoord.autoscaling.hpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.autoscaling.hpa.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.rootCoord.autoscaling.hpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: scaleTargetRef: diff --git a/bitnami/milvus/templates/root-coordinator/networkpolicy.yaml b/bitnami/milvus/templates/root-coordinator/networkpolicy.yaml index 082a02c261..c099aa60bf 100644 --- a/bitnami/milvus/templates/root-coordinator/networkpolicy.yaml +++ b/bitnami/milvus/templates/root-coordinator/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- 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: + {{- $podLabels := merge .Values.rootCoord.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: milvus - app.kubernetes.io/component: root-coordinator + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: milvus + app.kubernetes.io/component: root-coordinator policyTypes: - Ingress - Egress @@ -48,10 +46,7 @@ spec: - port: {{ include "milvus.kafka.port" . }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.rootCoord.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/milvus/templates/root-coordinator/pdb.yaml b/bitnami/milvus/templates/root-coordinator/pdb.yaml index 4a47a354d8..892842d731 100644 --- a/bitnami/milvus/templates/root-coordinator/pdb.yaml +++ b/bitnami/milvus/templates/root-coordinator/pdb.yaml @@ -9,12 +9,9 @@ kind: PodDisruptionBudget metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- 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 }} @@ -25,8 +22,9 @@ spec: {{- if .Values.rootCoord.pdb.maxUnavailable }} maxUnavailable: {{ .Values.rootCoord.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.rootCoord.podLabels .Values.commonLabels }} selector: - matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator {{- end }} diff --git a/bitnami/milvus/templates/root-coordinator/service-account.yaml b/bitnami/milvus/templates/root-coordinator/service-account.yaml index 472d406049..a5aa022f8d 100644 --- a/bitnami/milvus/templates/root-coordinator/service-account.yaml +++ b/bitnami/milvus/templates/root-coordinator/service-account.yaml @@ -9,18 +9,12 @@ kind: ServiceAccount metadata: name: {{ include "milvus.root-coordinator.serviceAccountName" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.rootCoord.serviceAccount.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.serviceAccount.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.rootCoord.serviceAccount.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.rootCoord.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} automountServiceAccountToken: {{ .Values.rootCoord.serviceAccount.automountServiceAccountToken }} {{- end }} diff --git a/bitnami/milvus/templates/root-coordinator/service.yaml b/bitnami/milvus/templates/root-coordinator/service.yaml index 89591982ea..e4088638cd 100644 --- a/bitnami/milvus/templates/root-coordinator/service.yaml +++ b/bitnami/milvus/templates/root-coordinator/service.yaml @@ -9,19 +9,14 @@ kind: Service metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.rootCoord.service.annotations }} + {{- if or .Values.commonAnnotations .Values.rootCoord.service.annotations (and .Values.rootCoord.metrics.enabled .Values.rootCoord.metrics.annotations) }} annotations: - {{- if .Values.rootCoord.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.service.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} + {{- if or .Values.rootCoord.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.rootCoord.service.annotations .Values.commonAnnotations }} + {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} {{- if and .Values.rootCoord.metrics.enabled .Values.rootCoord.metrics.annotations }} {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.metrics.annotations "context" $ ) | nindent 4 }} @@ -71,7 +66,8 @@ spec: {{- if .Values.rootCoord.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.rootCoord.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.rootCoord.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator {{- end }} diff --git a/bitnami/milvus/templates/root-coordinator/servicemonitor.yaml b/bitnami/milvus/templates/root-coordinator/servicemonitor.yaml index 0bd5dedc2f..4c1661c352 100644 --- a/bitnami/milvus/templates/root-coordinator/servicemonitor.yaml +++ b/bitnami/milvus/templates/root-coordinator/servicemonitor.yaml @@ -9,30 +9,20 @@ kind: ServiceMonitor metadata: name: {{ template "milvus.root-coordinator.fullname" . }} namespace: {{ default (include "common.names.namespace" .) .Values.rootCoord.metrics.serviceMonitor.namespace | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + {{- $labels := merge .Values.rootCoord.metrics.serviceMonitor.labels .Values.commonLabels }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.rootCoord.metrics.serviceMonitor.labels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.metrics.serviceMonitor.labels "context" $ ) | nindent 4 }} - {{- end }} - {{- if or .Values.commonAnnotations .Values.rootCoord.metrics.serviceMonitor.annotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.rootCoord.metrics.serviceMonitor.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.metrics.serviceMonitor.annotations "context" $ ) | nindent 4 }} - {{- end }} + {{- if or .Values.commonAnnotations .Values.rootCoord.metrics.serviceMonitor.annotations }} + {{- $annotations := merge .Values.rootCoord.metrics.serviceMonitor.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if .Values.rootCoord.metrics.serviceMonitor.jobLabel }} jobLabel: {{ .Values.rootCoord.metrics.serviceMonitor.jobLabel }} {{- end }} selector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 6 }} {{- if .Values.rootCoord.metrics.serviceMonitor.selector }} {{- include "common.tplvalues.render" (dict "value" .Values.rootCoord.metrics.serviceMonitor.selector "context" $) | nindent 6 }} {{- end }} diff --git a/bitnami/milvus/templates/root-coordinator/vpa.yaml b/bitnami/milvus/templates/root-coordinator/vpa.yaml index 6e51a18be7..84e6dc34e4 100644 --- a/bitnami/milvus/templates/root-coordinator/vpa.yaml +++ b/bitnami/milvus/templates/root-coordinator/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "milvus.root-coordinator.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus app.kubernetes.io/component: root-coordinator - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.rootCoord.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.rootCoord.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.rootCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.rootCoord.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/milvus/templates/secret.yaml b/bitnami/milvus/templates/secret.yaml index 190d9d123c..f3a62f55b5 100644 --- a/bitnami/milvus/templates/secret.yaml +++ b/bitnami/milvus/templates/secret.yaml @@ -9,11 +9,8 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/part-of: milvus - {{- 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 }}