diff --git a/bitnami/opensearch/Chart.lock b/bitnami/opensearch/Chart.lock new file mode 100644 index 0000000000..94305c49fa --- /dev/null +++ b/bitnami/opensearch/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: common + repository: oci://registry-1.docker.io/bitnamicharts + version: 2.9.0 +digest: sha256:416ad278a896f0e9b51d5305bef5d875c7cca6fbb64b75e1f131b04763e2aff9 +generated: "2023-08-22T14:25:45.817348+02:00" diff --git a/bitnami/opensearch/Chart.yaml b/bitnami/opensearch/Chart.yaml index c02e94914c..e301e96072 100644 --- a/bitnami/opensearch/Chart.yaml +++ b/bitnami/opensearch/Chart.yaml @@ -30,4 +30,4 @@ maintainers: name: opensearch sources: - https://github.com/bitnami/charts/tree/main/bitnami/opensearch -version: 0.1.6 +version: 0.2.0 diff --git a/bitnami/opensearch/templates/configmap.yaml b/bitnami/opensearch/templates/configmap.yaml index 1b2ea868d4..eff2b02f4f 100644 --- a/bitnami/opensearch/templates/configmap.yaml +++ b/bitnami/opensearch/templates/configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ include "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/coordinating/hpa.yaml b/bitnami/opensearch/templates/coordinating/hpa.yaml index 20b0a72a13..790f7dd41e 100644 --- a/bitnami/opensearch/templates/coordinating/hpa.yaml +++ b/bitnami/opensearch/templates/coordinating/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "opensearch.coordinating.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/component: coordinating-only - {{- 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/opensearch/templates/coordinating/networkpolicy.yaml b/bitnami/opensearch/templates/coordinating/networkpolicy.yaml index 935481f0b4..c8ad2a2c3f 100644 --- a/bitnami/opensearch/templates/coordinating/networkpolicy.yaml +++ b/bitnami/opensearch/templates/coordinating/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "opensearch.coordinating.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: opensearch app.kubernetes.io/component: coordinating-only - {{- 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.coordinating.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: opensearch - app.kubernetes.io/component: coordinating-only + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: opensearch + app.kubernetes.io/component: coordinating-only policyTypes: - Ingress - Egress @@ -40,10 +38,7 @@ spec: - port: {{ .Values.dashboards.service.ports.http }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.coordinating.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.coordinating.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.coordinating.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/coordinating/pdb.yaml b/bitnami/opensearch/templates/coordinating/pdb.yaml index 967c361192..171382398a 100644 --- a/bitnami/opensearch/templates/coordinating/pdb.yaml +++ b/bitnami/opensearch/templates/coordinating/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "opensearch.coordinating.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/component: coordinating-only - {{- 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 }} @@ -24,7 +21,8 @@ spec: {{- if .Values.coordinating.pdb.maxUnavailable }} maxUnavailable: {{ .Values.coordinating.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.coordinating.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/component: coordinating-only {{- end }} diff --git a/bitnami/opensearch/templates/coordinating/serviceaccount.yaml b/bitnami/opensearch/templates/coordinating/serviceaccount.yaml index 056efbc52d..95db92580d 100644 --- a/bitnami/opensearch/templates/coordinating/serviceaccount.yaml +++ b/bitnami/opensearch/templates/coordinating/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "opensearch.coordinating.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/component: coordinating-only - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.coordinating.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.coordinating.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.coordinating.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.coordinating.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/opensearch/templates/coordinating/statefulset.yaml b/bitnami/opensearch/templates/coordinating/statefulset.yaml index 5bfd4d9fe9..c3052bd800 100644 --- a/bitnami/opensearch/templates/coordinating/statefulset.yaml +++ b/bitnami/opensearch/templates/coordinating/statefulset.yaml @@ -9,30 +9,23 @@ kind: StatefulSet metadata: name: {{ include "opensearch.coordinating.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/component: coordinating-only {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: coordinating-only {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.coordinating.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.coordinating.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.coordinating.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.coordinating.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.coordinating.autoscaling.hpa.enabled }} replicas: {{ .Values.coordinating.replicaCount }} {{- end }} + {{- $podLabels := merge .Values.coordinating.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/component: coordinating-only {{- if .Values.coordinating.updateStrategy }} updateStrategy: {{- toYaml .Values.coordinating.updateStrategy | nindent 4 }} @@ -41,15 +34,12 @@ spec: podManagementPolicy: {{ .Values.coordinating.podManagementPolicy }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: coordinating-only {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: coordinating-only {{- end }} - {{- if .Values.coordinating.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "opensearch.createTlsSecret" .) (not .Values.security.tls.coordinating.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.coordinating.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAffinityPreset "component" "coordinating-only" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAntiAffinityPreset "component" "coordinating-only" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAffinityPreset "component" "coordinating-only" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.coordinating.podAntiAffinityPreset "component" "coordinating-only" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.coordinating.nodeAffinityPreset.type "key" .Values.coordinating.nodeAffinityPreset.key "values" .Values.coordinating.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.coordinating.nodeSelector }} diff --git a/bitnami/opensearch/templates/coordinating/svc-headless.yaml b/bitnami/opensearch/templates/coordinating/svc-headless.yaml index 3a6e29f809..ee5f0badef 100644 --- a/bitnami/opensearch/templates/coordinating/svc-headless.yaml +++ b/bitnami/opensearch/templates/coordinating/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "opensearch.coordinating.servicename" . }} 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/component: coordinating-only - {{- 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 }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.coordinating.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only {{- end }} diff --git a/bitnami/opensearch/templates/coordinating/vpa.yaml b/bitnami/opensearch/templates/coordinating/vpa.yaml index ccae61e5e7..188f8f9fda 100644 --- a/bitnami/opensearch/templates/coordinating/vpa.yaml +++ b/bitnami/opensearch/templates/coordinating/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "opensearch.coordinating.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: opensearch app.kubernetes.io/component: coordinating-only - {{- 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.coordinating.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.coordinating.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.coordinating.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.coordinating.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/opensearch/templates/dashboards/deployment.yaml b/bitnami/opensearch/templates/dashboards/deployment.yaml index bfb5fb32b9..1cf717d851 100644 --- a/bitnami/opensearch/templates/dashboards/deployment.yaml +++ b/bitnami/opensearch/templates/dashboards/deployment.yaml @@ -9,11 +9,8 @@ kind: Deployment metadata: name: {{ template "opensearch.dashboards.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/component: dashboards - {{- 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 }} @@ -24,22 +21,17 @@ spec: {{- if .Values.dashboards.updateStrategy }} strategy: {{- toYaml .Values.dashboards.updateStrategy | nindent 4 }} {{- end }} + {{- $podLabels := merge .Values.dashboards.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/component: dashboards template: metadata: {{- if .Values.dashboards.podAnnotations }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.dashboards.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/component: dashboards - {{- if .Values.dashboards.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.dashboards.podLabels "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 8 }} - {{- end }} spec: serviceAccountName: {{ template "opensearch.dashboards.serviceAccountName" . }} {{- include "opensearch.imagePullSecrets" . | nindent 6 }} @@ -50,8 +42,8 @@ spec: affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.dashboards.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dashboards.podAffinityPreset "component" "dashboards" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dashboards.podAntiAffinityPreset "component" "dashboards" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dashboards.podAffinityPreset "component" "dashboards" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.dashboards.podAntiAffinityPreset "component" "dashboards" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.dashboards.nodeAffinityPreset.type "key" .Values.dashboards.nodeAffinityPreset.key "values" .Values.dashboards.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.dashboards.nodeSelector }} diff --git a/bitnami/opensearch/templates/dashboards/hpa.yaml b/bitnami/opensearch/templates/dashboards/hpa.yaml index 92bdcfb322..49fc32e7eb 100644 --- a/bitnami/opensearch/templates/dashboards/hpa.yaml +++ b/bitnami/opensearch/templates/dashboards/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "opensearch.dashboards.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/component: dashboards - {{- 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/opensearch/templates/dashboards/networkpolicy.yaml b/bitnami/opensearch/templates/dashboards/networkpolicy.yaml index 55847568ce..0bf75a7e81 100644 --- a/bitnami/opensearch/templates/dashboards/networkpolicy.yaml +++ b/bitnami/opensearch/templates/dashboards/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "opensearch.dashboards.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: opensearch app.kubernetes.io/component: dashboards - {{- 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.dashboards.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: opensearch - app.kubernetes.io/component: dashboards + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: opensearch + app.kubernetes.io/component: dashboards policyTypes: - Ingress - Egress @@ -40,10 +38,7 @@ spec: - port: {{ .Values.dashboards.service.ports.http }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.dashboards.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.dashboards.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.dashboards.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.dashboards.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/dashboards/pdb.yaml b/bitnami/opensearch/templates/dashboards/pdb.yaml index cc4ad2cbc9..283590e4d4 100644 --- a/bitnami/opensearch/templates/dashboards/pdb.yaml +++ b/bitnami/opensearch/templates/dashboards/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "opensearch.dashboards.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/component: dashboards - {{- 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 }} @@ -24,7 +21,8 @@ spec: {{- if .Values.dashboards.pdb.maxUnavailable }} maxUnavailable: {{ .Values.dashboards.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.dashboards.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/component: dashboards {{- end }} diff --git a/bitnami/opensearch/templates/dashboards/service.yaml b/bitnami/opensearch/templates/dashboards/service.yaml index a830760ac7..16535f01db 100644 --- a/bitnami/opensearch/templates/dashboards/service.yaml +++ b/bitnami/opensearch/templates/dashboards/service.yaml @@ -9,19 +9,11 @@ kind: Service metadata: name: {{ include "opensearch.dashboards.servicename" . }} 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/component: dashboards - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.dashboards.service.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.dashboards.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dashboards.service.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.dashboards.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: type: {{ .Values.dashboards.service.type }} @@ -56,6 +48,7 @@ spec: {{- if .Values.dashboards.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.dashboards.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.dashboards.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: dashboards {{- end }} diff --git a/bitnami/opensearch/templates/dashboards/serviceaccount.yaml b/bitnami/opensearch/templates/dashboards/serviceaccount.yaml index eebcc10c6b..e412fdec75 100644 --- a/bitnami/opensearch/templates/dashboards/serviceaccount.yaml +++ b/bitnami/opensearch/templates/dashboards/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "opensearch.dashboards.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/component: dashboards - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.dashboards.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.dashboards.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.dashboards.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.dashboards.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.dashboards.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/opensearch/templates/dashboards/tls-secret.yaml b/bitnami/opensearch/templates/dashboards/tls-secret.yaml index 92c75527b4..abfa2e2c5c 100644 --- a/bitnami/opensearch/templates/dashboards/tls-secret.yaml +++ b/bitnami/opensearch/templates/dashboards/tls-secret.yaml @@ -16,10 +16,7 @@ kind: Secret metadata: name: {{ $secretDashboardsName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/dashboards/vpa.yaml b/bitnami/opensearch/templates/dashboards/vpa.yaml index 4aca69ab16..deccc5395d 100644 --- a/bitnami/opensearch/templates/dashboards/vpa.yaml +++ b/bitnami/opensearch/templates/dashboards/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "opensearch.dashboards.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: opensearch app.kubernetes.io/component: dashboards - {{- 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.dashboards.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.dashboards.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.dashboards.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.dashboards.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/opensearch/templates/data/hpa.yaml b/bitnami/opensearch/templates/data/hpa.yaml index c98dd0915c..ca764d68e8 100644 --- a/bitnami/opensearch/templates/data/hpa.yaml +++ b/bitnami/opensearch/templates/data/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "opensearch.data.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/component: data - {{- 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/opensearch/templates/data/networkpolicy.yaml b/bitnami/opensearch/templates/data/networkpolicy.yaml index 8276486667..3c25f6dcd1 100644 --- a/bitnami/opensearch/templates/data/networkpolicy.yaml +++ b/bitnami/opensearch/templates/data/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "opensearch.data.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: opensearch app.kubernetes.io/component: data - {{- 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.data.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: opensearch - app.kubernetes.io/component: data + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: opensearch + app.kubernetes.io/component: data policyTypes: - Ingress - Egress @@ -40,10 +38,7 @@ spec: - port: {{ .Values.dashboards.service.ports.http }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.data.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.data.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.data.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/data/pdb.yaml b/bitnami/opensearch/templates/data/pdb.yaml index 42e291052b..5d183ebe5f 100644 --- a/bitnami/opensearch/templates/data/pdb.yaml +++ b/bitnami/opensearch/templates/data/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "opensearch.data.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/component: data - {{- 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 }} @@ -24,7 +21,8 @@ spec: {{- if .Values.data.pdb.maxUnavailable }} maxUnavailable: {{ .Values.data.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.data.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/component: data {{- end }} diff --git a/bitnami/opensearch/templates/data/serviceaccount.yaml b/bitnami/opensearch/templates/data/serviceaccount.yaml index f63346b75e..26112b327a 100644 --- a/bitnami/opensearch/templates/data/serviceaccount.yaml +++ b/bitnami/opensearch/templates/data/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "opensearch.data.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/component: data - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.data.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.data.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.data.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.data.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/opensearch/templates/data/statefulset.yaml b/bitnami/opensearch/templates/data/statefulset.yaml index 4066922719..77db7825c0 100644 --- a/bitnami/opensearch/templates/data/statefulset.yaml +++ b/bitnami/opensearch/templates/data/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "opensearch.data.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/component: data {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: data {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.data.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.data.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.data.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.data.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.data.autoscaling.hpa.enabled }} replicas: {{ .Values.data.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.data.podManagementPolicy }} + {{- $podLabels := merge .Values.data.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/component: data serviceName: {{ include "opensearch.data.servicename" . }} {{- if .Values.data.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: data {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: data {{- end }} - {{- if .Values.data.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "opensearch.createTlsSecret" .) (not .Values.security.tls.data.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.data.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAffinityPreset "component" "data" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAntiAffinityPreset "component" "data" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAffinityPreset "component" "data" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.data.podAntiAffinityPreset "component" "data" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.data.nodeAffinityPreset.type "key" .Values.data.nodeAffinityPreset.key "values" .Values.data.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.data.nodeSelector }} @@ -338,13 +328,10 @@ spec: volumeClaimTemplates: - metadata: name: "data" - annotations: - {{- if .Values.data.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.data.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.data.persistence.annotations .Values.commonAnnotations }} + {{- $claimAnnotations := merge .Values.data.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $) | nindent 4 }} + {{- end }} {{- if .Values.commonLabels }} labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} {{- end }} diff --git a/bitnami/opensearch/templates/data/svc-headless.yaml b/bitnami/opensearch/templates/data/svc-headless.yaml index 7e316aca1a..6bee7f0f65 100644 --- a/bitnami/opensearch/templates/data/svc-headless.yaml +++ b/bitnami/opensearch/templates/data/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "opensearch.data.servicename" . }} 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/component: data - {{- 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 }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.data.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data {{- end }} diff --git a/bitnami/opensearch/templates/data/vpa.yaml b/bitnami/opensearch/templates/data/vpa.yaml index 049f3d925b..9640f89613 100644 --- a/bitnami/opensearch/templates/data/vpa.yaml +++ b/bitnami/opensearch/templates/data/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "opensearch.data.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: opensearch app.kubernetes.io/component: data - {{- 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.data.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.data.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.data.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.data.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/opensearch/templates/ingest/hpa.yaml b/bitnami/opensearch/templates/ingest/hpa.yaml index 14fb5bb952..4922d92eab 100644 --- a/bitnami/opensearch/templates/ingest/hpa.yaml +++ b/bitnami/opensearch/templates/ingest/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "opensearch.ingest.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/component: ingest - {{- 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/opensearch/templates/ingest/ingress.yaml b/bitnami/opensearch/templates/ingest/ingress.yaml index 7b480cd0b9..f9055deefa 100644 --- a/bitnami/opensearch/templates/ingest/ingress.yaml +++ b/bitnami/opensearch/templates/ingest/ingress.yaml @@ -9,19 +9,11 @@ kind: Ingress metadata: name: {{ include "opensearch.ingest.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/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.ingress.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingest.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if and .Values.ingest.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/bitnami/opensearch/templates/ingest/networkpolicy.yaml b/bitnami/opensearch/templates/ingest/networkpolicy.yaml index 5ef3144fdf..351dc2b2ac 100644 --- a/bitnami/opensearch/templates/ingest/networkpolicy.yaml +++ b/bitnami/opensearch/templates/ingest/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "opensearch.ingest.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: opensearch app.kubernetes.io/component: ingest - {{- 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.ingest.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: opensearch - app.kubernetes.io/component: ingest + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: opensearch + app.kubernetes.io/component: ingest policyTypes: - Ingress - Egress @@ -40,10 +38,7 @@ spec: - port: {{ .Values.dashboards.service.ports.http }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.ingest.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingest.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.ingest.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/ingest/pdb.yaml b/bitnami/opensearch/templates/ingest/pdb.yaml index 0ea7b225e1..eca191d716 100644 --- a/bitnami/opensearch/templates/ingest/pdb.yaml +++ b/bitnami/opensearch/templates/ingest/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "opensearch.ingest.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/component: ingest - {{- 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 }} @@ -24,7 +21,8 @@ spec: {{- if .Values.ingest.pdb.maxUnavailable }} maxUnavailable: {{ .Values.ingest.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.ingest.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/component: ingest {{- end }} diff --git a/bitnami/opensearch/templates/ingest/service.yaml b/bitnami/opensearch/templates/ingest/service.yaml index 89035e79bf..374dc8b30d 100644 --- a/bitnami/opensearch/templates/ingest/service.yaml +++ b/bitnami/opensearch/templates/ingest/service.yaml @@ -9,18 +9,12 @@ kind: Service metadata: name: {{ include "opensearch.ingest.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/component: ingest - {{- 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.ingest.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- if or .Values.ingest.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingest.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.ingest.service.type }} {{- if and .Values.ingest.service.clusterIP (eq .Values.ingest.service.type "ClusterIP") }} @@ -60,6 +54,7 @@ spec: {{- if .Values.ingest.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.ingest.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- end }} diff --git a/bitnami/opensearch/templates/ingest/serviceaccount.yaml b/bitnami/opensearch/templates/ingest/serviceaccount.yaml index aeb0aac8de..95a3357f77 100644 --- a/bitnami/opensearch/templates/ingest/serviceaccount.yaml +++ b/bitnami/opensearch/templates/ingest/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "opensearch.ingest.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/component: ingest - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.ingest.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingest.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.ingest.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/opensearch/templates/ingest/statefulset.yaml b/bitnami/opensearch/templates/ingest/statefulset.yaml index 97c1682bfa..8b70c5278e 100644 --- a/bitnami/opensearch/templates/ingest/statefulset.yaml +++ b/bitnami/opensearch/templates/ingest/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "opensearch.ingest.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/component: ingest {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: ingest {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.ingest.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingest.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingest.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.ingest.autoscaling.hpa.enabled }} replicas: {{ .Values.ingest.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.ingest.podManagementPolicy }} + {{- $podLabels := merge .Values.ingest.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/component: ingest serviceName: {{ include "opensearch.ingest.servicename" . }} {{- if .Values.ingest.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: ingest {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: ingest {{- end }} - {{- if .Values.ingest.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.ingest.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "opensearch.createTlsSecret" .) (not .Values.security.tls.ingest.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.ingest.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAffinityPreset "component" "ingest" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAntiAffinityPreset "component" "ingest" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAffinityPreset "component" "ingest" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.ingest.podAntiAffinityPreset "component" "ingest" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.ingest.nodeAffinityPreset.type "key" .Values.ingest.nodeAffinityPreset.key "values" .Values.ingest.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.ingest.nodeSelector }} diff --git a/bitnami/opensearch/templates/ingest/svc-headless.yaml b/bitnami/opensearch/templates/ingest/svc-headless.yaml index a45e879bcb..47ecc6fbb2 100644 --- a/bitnami/opensearch/templates/ingest/svc-headless.yaml +++ b/bitnami/opensearch/templates/ingest/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "opensearch.ingest.servicename" . }} 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/component: ingest - {{- 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 }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.ingest.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- end }} diff --git a/bitnami/opensearch/templates/ingest/vpa.yaml b/bitnami/opensearch/templates/ingest/vpa.yaml index a439bcd045..d32ddf8869 100644 --- a/bitnami/opensearch/templates/ingest/vpa.yaml +++ b/bitnami/opensearch/templates/ingest/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "opensearch.ingest.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: opensearch app.kubernetes.io/component: ingest - {{- 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.ingest.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingest.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.ingest.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingest.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/opensearch/templates/ingress-tls-secrets.yaml b/bitnami/opensearch/templates/ingress-tls-secrets.yaml index 4627daf9f2..a5725b4240 100644 --- a/bitnami/opensearch/templates/ingress-tls-secrets.yaml +++ b/bitnami/opensearch/templates/ingress-tls-secrets.yaml @@ -11,10 +11,7 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ template "common.names.namespace" $ }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} - {{- if $.Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" $.Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} {{- if $.Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" $.Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -34,10 +31,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "common.names.namespace" . }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -57,11 +51,8 @@ kind: Secret metadata: name: {{ .name }} namespace: {{ printf "%s-ingest-ingress" (include "common.names.namespace" $ ) }} - labels: {{- include "common.labels.standard" $ | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $.Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- 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 }} @@ -81,11 +72,8 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ template "common.names.namespace" $ }} - labels: {{- include "common.labels.standard" . | nindent 4 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest - {{- 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/opensearch/templates/ingress.yaml b/bitnami/opensearch/templates/ingress.yaml index a7131fe0b9..d625cc37b1 100644 --- a/bitnami/opensearch/templates/ingress.yaml +++ b/bitnami/opensearch/templates/ingress.yaml @@ -9,19 +9,11 @@ kind: Ingress metadata: name: {{ 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/component: opensearch - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.ingress.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.ingress.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.ingress.annotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.ingress.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if and .Values.ingress.ingressClassName (eq "true" (include "common.ingress.supportsIngressClassname" .)) }} diff --git a/bitnami/opensearch/templates/initialization-configmap.yaml b/bitnami/opensearch/templates/initialization-configmap.yaml index 879c95af51..2e3ef38ac3 100644 --- a/bitnami/opensearch/templates/initialization-configmap.yaml +++ b/bitnami/opensearch/templates/initialization-configmap.yaml @@ -9,10 +9,7 @@ kind: ConfigMap metadata: name: {{ printf "%s-init-scripts" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/master/hpa.yaml b/bitnami/opensearch/templates/master/hpa.yaml index 2d9244fca7..29b9ea66fd 100644 --- a/bitnami/opensearch/templates/master/hpa.yaml +++ b/bitnami/opensearch/templates/master/hpa.yaml @@ -9,11 +9,8 @@ kind: HorizontalPodAutoscaler metadata: name: {{ include "opensearch.master.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/component: master - {{- 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/opensearch/templates/master/networkpolicy.yaml b/bitnami/opensearch/templates/master/networkpolicy.yaml index 10f83aad01..948910821b 100644 --- a/bitnami/opensearch/templates/master/networkpolicy.yaml +++ b/bitnami/opensearch/templates/master/networkpolicy.yaml @@ -9,20 +9,18 @@ apiVersion: {{ include "common.capabilities.networkPolicy.apiVersion" . }} metadata: name: {{ template "opensearch.master.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: opensearch app.kubernetes.io/component: master - {{- 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.master.podLabels .Values.commonLabels }} podSelector: - matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/part-of: opensearch - app.kubernetes.io/component: master + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }} + app.kubernetes.io/part-of: opensearch + app.kubernetes.io/component: master policyTypes: - Ingress - Egress @@ -40,10 +38,7 @@ spec: - port: {{ .Values.dashboards.service.ports.http }} to: - podSelector: - matchLabels: {{- include "common.labels.standard" . | nindent 14 }} - {{- if .Values.master.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.podLabels "context" $) | nindent 14 }} - {{- end }} + matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 14 }} {{- if .Values.master.networkPolicy.extraEgress }} {{- include "common.tplvalues.render" ( dict "value" .Values.master.networkPolicy.extraEgress "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/master/pdb.yaml b/bitnami/opensearch/templates/master/pdb.yaml index 9cb186841a..580d83b4dd 100644 --- a/bitnami/opensearch/templates/master/pdb.yaml +++ b/bitnami/opensearch/templates/master/pdb.yaml @@ -9,11 +9,8 @@ kind: PodDisruptionBudget metadata: name: {{ include "opensearch.master.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/component: master - {{- 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 }} @@ -24,7 +21,8 @@ spec: {{- if .Values.master.pdb.maxUnavailable }} maxUnavailable: {{ .Values.master.pdb.maxUnavailable }} {{- end }} + {{- $podLabels := merge .Values.master.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/component: master {{- end }} diff --git a/bitnami/opensearch/templates/master/serviceaccount.yaml b/bitnami/opensearch/templates/master/serviceaccount.yaml index 8c472b2876..a7b9611bc6 100644 --- a/bitnami/opensearch/templates/master/serviceaccount.yaml +++ b/bitnami/opensearch/templates/master/serviceaccount.yaml @@ -9,19 +9,11 @@ kind: ServiceAccount metadata: name: {{ include "opensearch.master.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/component: master - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} {{- if or .Values.master.serviceAccount.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.master.serviceAccount.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.serviceAccount.annotations "context" $) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.master.serviceAccount.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} automountServiceAccountToken: {{ .Values.master.serviceAccount.automountServiceAccountToken }} {{- end -}} diff --git a/bitnami/opensearch/templates/master/statefulset.yaml b/bitnami/opensearch/templates/master/statefulset.yaml index 0671677d6f..1846a51f6e 100644 --- a/bitnami/opensearch/templates/master/statefulset.yaml +++ b/bitnami/opensearch/templates/master/statefulset.yaml @@ -9,31 +9,24 @@ kind: StatefulSet metadata: name: {{ include "opensearch.master.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/component: master {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: master {{- end }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} {{- if or .Values.master.annotations .Values.commonAnnotations }} - annotations: - {{- if .Values.master.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.annotations "context" $ ) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} - {{- end }} + {{- $annotations := merge .Values.master.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: {{- if not .Values.master.autoscaling.hpa.enabled }} replicas: {{ .Values.master.replicaCount }} {{- end }} podManagementPolicy: {{ .Values.master.podManagementPolicy }} + {{- $podLabels := merge .Values.master.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/component: master serviceName: {{ include "opensearch.master.servicename" . }} {{- if .Values.master.updateStrategy }} @@ -41,15 +34,12 @@ spec: {{- end }} template: metadata: - labels: {{- include "common.labels.standard" . | nindent 8 }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }} app.kubernetes.io/component: master {{- if .Values.useIstioLabels }} ## Istio Labels: https://istio.io/docs/ops/deployment/requirements/ app: master {{- end }} - {{- if .Values.master.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.podLabels "context" $) | nindent 8 }} - {{- end }} annotations: {{- if and (include "opensearch.createTlsSecret" .) (not .Values.security.tls.master.existingSecret) }} checksum/tls: {{ include (print $.Template.BasePath "/tls-secret.yaml") . | sha256sum }} @@ -67,8 +57,8 @@ spec: affinity: {{- include "common.tplvalues.render" (dict "value" .Values.master.affinity "context" $) | nindent 8 }} {{- else }} affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "context" $) | nindent 10 }} + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.master.podAntiAffinityPreset "component" "master" "customLabels" $podLabels "context" $) | nindent 10 }} nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.master.nodeAffinityPreset.type "key" .Values.master.nodeAffinityPreset.key "values" .Values.master.nodeAffinityPreset.values) | nindent 10 }} {{- end }} {{- if .Values.master.nodeSelector }} @@ -350,13 +340,10 @@ spec: volumeClaimTemplates: - metadata: name: "data" - annotations: - {{- if .Values.master.persistence.annotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.master.persistence.annotations "context" $) | nindent 10 }} - {{- end }} - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 10 }} - {{- end }} + {{- if or .Values.master.persistence.annotations .Values.commonAnnotations }} + {{- $claimAnnotations := merge .Values.master.persistence.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $) | nindent 4 }} + {{- end }} {{- if .Values.commonLabels }} labels: {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 10 }} {{- end }} diff --git a/bitnami/opensearch/templates/master/svc-headless.yaml b/bitnami/opensearch/templates/master/svc-headless.yaml index ad208c8ef6..793c847bbf 100644 --- a/bitnami/opensearch/templates/master/svc-headless.yaml +++ b/bitnami/opensearch/templates/master/svc-headless.yaml @@ -9,11 +9,8 @@ kind: Service metadata: name: {{ include "opensearch.master.servicename" . }} 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/component: master - {{- 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 }} @@ -28,6 +25,7 @@ spec: - name: tcp-transport port: {{ .Values.containerPorts.transport }} targetPort: transport - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + {{- $podLabels := merge .Values.master.podLabels .Values.commonLabels }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master {{- end }} diff --git a/bitnami/opensearch/templates/master/vpa.yaml b/bitnami/opensearch/templates/master/vpa.yaml index fc31baa303..ddcf393901 100644 --- a/bitnami/opensearch/templates/master/vpa.yaml +++ b/bitnami/opensearch/templates/master/vpa.yaml @@ -9,18 +9,12 @@ kind: VerticalPodAutoscaler metadata: name: {{ include "opensearch.master.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: opensearch app.kubernetes.io/component: master - {{- 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.master.autoscaling.vpa.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.master.autoscaling.vpa.annotations "context" $ ) | nindent 4 }} + {{- if or .Values.ingest.autoscaling.vpa.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.ingest.autoscaling.vpa.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} {{- end }} spec: resourcePolicy: diff --git a/bitnami/opensearch/templates/secrets.yaml b/bitnami/opensearch/templates/secrets.yaml index 177c4ac40a..dd5fe42900 100644 --- a/bitnami/opensearch/templates/secrets.yaml +++ b/bitnami/opensearch/templates/secrets.yaml @@ -9,10 +9,7 @@ kind: Secret metadata: name: {{ template "common.names.fullname" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -29,10 +26,7 @@ kind: Secret metadata: name: {{ printf "%s-tls-pass" (include "common.names.fullname" .) }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} diff --git a/bitnami/opensearch/templates/service.yaml b/bitnami/opensearch/templates/service.yaml index edbce5f8c4..379da0699f 100644 --- a/bitnami/opensearch/templates/service.yaml +++ b/bitnami/opensearch/templates/service.yaml @@ -8,22 +8,16 @@ kind: Service metadata: name: {{ include "opensearch.service.name" . }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if (include "opensearch.coordinating.enabled" .) }} app.kubernetes.io/component: coordinating-only {{- else }} app.kubernetes.io/component: master {{- end }} - annotations: - {{- if .Values.commonAnnotations }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.service.annotations }} - {{- include "common.tplvalues.render" ( dict "value" .Values.service.annotations "context" $) | nindent 4 }} - {{- end }} + {{- if or .Values.service.annotations .Values.commonAnnotations }} + {{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }} + {{- end }} spec: type: {{ .Values.service.type }} {{- if and .Values.service.clusterIP (eq .Values.service.type "ClusterIP") }} @@ -63,7 +57,7 @@ spec: {{- if .Values.service.extraPorts }} {{- include "common.tplvalues.render" (dict "value" .Values.service.extraPorts "context" $) | nindent 4 }} {{- end }} - selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + selector: {{- include "common.labels.matchLabels" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if (include "opensearch.coordinating.enabled" .) }} app.kubernetes.io/component: coordinating-only {{- else }} diff --git a/bitnami/opensearch/templates/tls-secret.yaml b/bitnami/opensearch/templates/tls-secret.yaml index a7408e658a..0295e1b4d0 100644 --- a/bitnami/opensearch/templates/tls-secret.yaml +++ b/bitnami/opensearch/templates/tls-secret.yaml @@ -14,10 +14,7 @@ kind: Secret metadata: name: {{ $secretAdminName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} {{- end }} @@ -41,10 +38,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: master {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -67,10 +61,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: data {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -93,10 +84,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: coordinating-only {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} @@ -123,10 +111,7 @@ kind: Secret metadata: name: {{ $secretName }} namespace: {{ include "common.names.namespace" . | quote }} - labels: {{- include "common.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} - {{- end }} + labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }} app.kubernetes.io/component: ingest {{- if .Values.commonAnnotations }} annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}