Skip to content

Commit

Permalink
[Feature] Chart: topology spread constraints supported
Browse files Browse the repository at this point in the history
Enable setting topologySpreadConstraints for CAP Operators own pods.

Change-Id: I5ddd39cc3cf3449f127506a3c83587e9b6ff8ad6
  • Loading branch information
Pavan-SAP committed Jan 3, 2024
1 parent 22bea64 commit b565d41
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
description: Helm chart to deploy CAP Operator https://sap.github.io/cap-operator/
name: cap-operator
version: 0.0.1
version: 0.0.2
appVersion: 0.0.1
4 changes: 4 additions & 0 deletions chart/templates/controller-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ spec:
{{- with .Values.controller.priorityClassName | default .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.controller.topologySpreadConstraints | default .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: controller
image: {{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Values.image.tag | default .Chart.AppVersion }}
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
{{- with .Values.subscriptionServer.priorityClassName | default .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.subscriptionServer.topologySpreadConstraints | default .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: server
image: {{ .Values.subscriptionServer.image.repository }}:{{ .Values.subscriptionServer.image.tag | default .Values.image.tag | default .Chart.AppVersion }}
Expand Down
4 changes: 4 additions & 0 deletions chart/templates/webhook-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ spec:
{{- with .Values.webhook.priorityClassName | default .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
{{- with .Values.webhook.topologySpreadConstraints | default .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{.Release.Name}}-webhook
automountServiceAccountToken: true
containers:
Expand Down
8 changes: 8 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ affinity: {}
tolerations: []
# -- Default priority class (can be overwritten on component level)
priorityClassName: ""
# -- Default topology spread constraints (can be overwritten on component level)
topologySpreadConstraints: []

controller:
# -- Replicas
Expand All @@ -38,6 +40,8 @@ controller:
tolerations: []
# -- Priority class
priorityClassName: ""
# -- Topology spread constraints
topologySpreadConstraints: []
# -- Security context
securityContext: {}
resources:
Expand Down Expand Up @@ -74,6 +78,8 @@ subscriptionServer:
tolerations: []
# -- Priority class
priorityClassName: ""
# -- Topology spread constraints
topologySpreadConstraints: []
# -- Security context
securityContext: {}
resources:
Expand Down Expand Up @@ -123,6 +129,8 @@ webhook:
tolerations: []
# -- Priority class
priorityClassName: ""
# -- Topology spread constraints
topologySpreadConstraints: []
# -- Security context
securityContext: {}
resources:
Expand Down

0 comments on commit b565d41

Please sign in to comment.