Browse Source

Add topologySpreadConstraints config (#2237)

Signed-off-by: Sam Hopwell <sam.hopwell@cybsafe.com>
Sam Hopwell 3 years ago
parent
commit
0b9f33e5f7

+ 2 - 0
deploy/charts/external-secrets/README.md

@@ -75,6 +75,7 @@ The command removes all the Kubernetes components associated with the chart and
 | certController.serviceMonitor.interval | string | `"30s"` | Interval to scrape metrics |
 | certController.serviceMonitor.scrapeTimeout | string | `"25s"` | Timeout if metrics can't be retrieved in given time interval |
 | certController.tolerations | list | `[]` |  |
+| certController.topologySpreadConstraints | list | `[]` |  |
 | concurrent | int | `1` | Specifies the number of concurrent ExternalSecret Reconciles external-secret executes at a time. |
 | controllerClass | string | `""` | If set external secrets will filter matching Secret Stores with the appropriate controller values. |
 | crds.annotations | object | `{}` |  |
@@ -182,3 +183,4 @@ The command removes all the Kubernetes components associated with the chart and
 | webhook.serviceMonitor.interval | string | `"30s"` | Interval to scrape metrics |
 | webhook.serviceMonitor.scrapeTimeout | string | `"25s"` | Timeout if metrics can't be retrieved in given time interval |
 | webhook.tolerations | list | `[]` |  |
+| webhook.topologySpreadConstraints | list | `[]` |  |

+ 4 - 0
deploy/charts/external-secrets/templates/cert-controller-deployment.yaml

@@ -102,6 +102,10 @@ spec:
       tolerations:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      {{- with .Values.certController.topologySpreadConstraints }}
+      topologySpreadConstraints:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
       {{- if .Values.certController.priorityClassName }}
       priorityClassName: {{ .Values.certController.priorityClassName }}
       {{- end }}

+ 4 - 0
deploy/charts/external-secrets/templates/webhook-deployment.yaml

@@ -112,6 +112,10 @@ spec:
       tolerations:
         {{- toYaml . | nindent 8 }}
       {{- end }}
+      {{- with .Values.webhook.topologySpreadConstraints }}
+      topologySpreadConstraints:
+        {{- toYaml . | nindent 8 }}
+      {{- end }}
       {{- if .Values.webhook.priorityClassName }}
       priorityClassName: {{ .Values.webhook.priorityClassName }}
       {{- end }}

+ 4 - 0
deploy/charts/external-secrets/values.yaml

@@ -237,6 +237,8 @@ webhook:
 
   tolerations: []
 
+  topologySpreadConstraints: []
+
   affinity: {}
 
     # -- Pod priority class name.
@@ -360,6 +362,8 @@ certController:
 
   tolerations: []
 
+  topologySpreadConstraints: []
+
   affinity: {}
 
     # -- Pod priority class name.