diff --git a/charts/kafka-ui/Chart.yaml b/charts/kafka-ui/Chart.yaml index a7f0cf2e..a296f4f7 100644 --- a/charts/kafka-ui/Chart.yaml +++ b/charts/kafka-ui/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: kafka-ui description: A Helm chart for kafka-UI type: application -version: 0.7.4 +version: 0.7.5 appVersion: v0.7.1 icon: https://github.com/provectus/kafka-ui/raw/master/documentation/images/kafka-ui-logo.png diff --git a/charts/kafka-ui/templates/deployment.yaml b/charts/kafka-ui/templates/deployment.yaml index 3e4ac2b4..f28d351c 100644 --- a/charts/kafka-ui/templates/deployment.yaml +++ b/charts/kafka-ui/templates/deployment.yaml @@ -41,6 +41,10 @@ spec: serviceAccountName: {{ include "kafka-ui.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- with .Values.priorityClassName }} + priorityClassName: + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: {{ .Chart.Name }} securityContext: @@ -148,3 +152,7 @@ spec: tolerations: {{- toYaml . | nindent 8 }} {{- end }} + {{- with .Values.topologySpreadConstraints }} + topologySpreadConstraints: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/charts/kafka-ui/templates/pdb.yaml b/charts/kafka-ui/templates/pdb.yaml new file mode 100644 index 00000000..3710c489 --- /dev/null +++ b/charts/kafka-ui/templates/pdb.yaml @@ -0,0 +1,24 @@ +{{- if .Values.podDisruptionBudget.enabled -}} +{{- $kubeCapabilityVersion := semver .Capabilities.KubeVersion.Version -}} +{{- $isHigher1p21 := ge (semver "1.21" | $kubeCapabilityVersion.Compare) 0 -}} +{{- if $isHigher1p21 -}} +apiVersion: policy/v1 +{{- else }} +apiVersion: policy/v1beta1 +{{- end }} +kind: PodDisruptionBudget +metadata: + name: {{ include "kafka-ui.fullname" . }} + labels: + {{- include "kafka-ui.labels" . | nindent 4 }} +spec: + {{- if .Values.podDisruptionBudget.minAvailable }} + minAvailable: {{ .Values.podDisruptionBudget.minAvailable }} + {{- end }} + {{- if .Values.podDisruptionBudget.maxUnavailable }} + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + {{- end }} + selector: + matchLabels: + {{- include "kafka-ui.selectorLabels" . | nindent 6 }} +{{- end -}} diff --git a/charts/kafka-ui/values.yaml b/charts/kafka-ui/values.yaml index 72038e9b..fb24666d 100644 --- a/charts/kafka-ui/values.yaml +++ b/charts/kafka-ui/values.yaml @@ -91,6 +91,17 @@ securityContext: # runAsNonRoot: true # runAsUser: 1000 +## Set Pod Priority Class - importance of Pod relatives to other pods +## +priorityClassName: default + +## Set Pod Disruption Budget to limit the number of concurrent disruptions +## Ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/ +podDisruptionBudget: + enabled: false + minAvailable: "" + maxUnavailable: "" + service: type: ClusterIP port: 80 @@ -161,3 +172,10 @@ initContainers: {} volumeMounts: {} volumes: {} + +## Set custom TopologySpreadConstraints to manage the distribution of Pods across cluster’s failure-domains +## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ +topologySpreadConstraints: [] + # - maxSkew: 1 + # topologyKey: kubernetes.io/hostname + # whenUnsatisfiable: DoNotSchedule