diff --git a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/deploymentMetricsAggregator.yaml b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/deploymentMetricsAggregator.yaml index ae2a269f..eb028616 100644 --- a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/deploymentMetricsAggregator.yaml +++ b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/templates/deploymentMetricsAggregator.yaml @@ -54,6 +54,10 @@ spec: {{- if .Values.imageAgg.usePullSecret }} imagePullSecrets: - name: {{ .Values.imageAgg.pullsecretName}} + {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{- toYaml . | nindent 8 }} {{- end }} containers: - name: splunk-fluentd-k8s-metrics-agg diff --git a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml index 3544c66b..753a9aff 100644 --- a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml +++ b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-metrics/values.yaml @@ -207,6 +207,18 @@ priorityClassNameAgg: # Defines node affinity to restrict pod deployment. affinity: {} +# Defines topologySpreadConstraints to restrict pod deployment. +topologySpreadConstraints: [] +#- maxSkew: 1 +# topologyKey: topology.kubernetes.io/zone +# whenUnsatisfiable: DoNotSchedule +# labelSelector: +# matchExpressions: +# - key: component +# operator: In +# values: +# - aggregator + # = Kubernetes Connection Configs = kubernetes: # The hostname or IP address that kubelet will use to connect to. If not supplied, status.hostIP of the node is used to fetch metrics from the Kubelet API (via the $KUBERNETES_NODE_IP environment variable). diff --git a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/templates/deployment.yaml b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/templates/deployment.yaml index 821e38b0..6f2ce394 100644 --- a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/templates/deployment.yaml +++ b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/templates/deployment.yaml @@ -53,6 +53,10 @@ spec: imagePullSecrets: - name: {{ .Values.image.pullSecretName }} {{ end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: +{{- toYaml . | nindent 8 }} + {{- end }} containers: - name: splunk-fluentd-k8s-objects image: {{ template "splunk-kubernetes-objects.image" . }} diff --git a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/values.yaml b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/values.yaml index 2fad5f16..873b5ea2 100644 --- a/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/values.yaml +++ b/helm-chart/splunk-connect-for-kubernetes/charts/splunk-kubernetes-objects/values.yaml @@ -259,6 +259,18 @@ tolerations: [] # Defines node affinity to restrict pod deployment. affinity: {} +# Defines topologySpreadConstraints to restrict pod deployment. +topologySpreadConstraints: [] +#- maxSkew: 1 +# topologyKey: topology.kubernetes.io/zone +# whenUnsatisfiable: DoNotSchedule +# labelSelector: +# matchExpressions: +# - key: app +# operator: In +# values: +# - splunk-kubernetes-objects + # `customFilters` defines the custom filters to be used. # This section can be used to define custom filters using plugins like https://github.com/splunk/fluent-plugin-jq # Its also possible to use other filters like https://www.fluentd.org/plugins#filter