mirror of
https://github.com/k8s-at-home/charts.git
synced 2025-01-23 15:39:02 +00:00
[oauth2-proxy] Add support for topologySpreadConstraints (#496)
Signed-off-by: Stephan Austermühle <au@hcsd.de>
This commit is contained in:
parent
36dd871e05
commit
7f01d91432
@ -1,5 +1,5 @@
|
||||
name: oauth2-proxy
|
||||
version: 4.1.0
|
||||
version: 4.2.0
|
||||
apiVersion: v1
|
||||
appVersion: 5.1.0
|
||||
home: https://oauth2-proxy.github.io/oauth2-proxy/
|
||||
|
@ -119,6 +119,10 @@ Parameter | Description | Default
|
||||
`serviceAccount.name` | the service account name | ``
|
||||
`serviceAccount.annotations` | (optional) annotations for the service account | `{}`
|
||||
`tolerations` | list of node taints to tolerate | `[]`
|
||||
`topologySpreadConstraints.enabled` | enable Kubernetes [topologySpreadConstraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/) | `false`
|
||||
`topologySpreadConstraints.maxSkew` | the degree to which Pods may be unevenly distributed | `1`
|
||||
`topologySpreadConstraints.topologyKey` | the key of node labels | `topology.kubernetes.io/zone`
|
||||
`topologySpreadConstraints.whenUnsatisfiable` | how to deal with a Pod if it doesn't satisfy the spread constraint (`DoNotSchedule`, `ScheduleAnyway`) | `DoNotSchedule`
|
||||
`securityContext.enabled` | enable Kubernetes security context on container | `false`
|
||||
`securityContext.runAsNonRoot` | make sure that the container runs as a non-root user | `true`
|
||||
`proxyVarsAsSecrets` | choose between environment values or secrets for setting up OAUTH2_PROXY variables. When set to false, remember to add the variables OAUTH2_PROXY_CLIENT_ID, OAUTH2_PROXY_CLIENT_SECRET, OAUTH2_PROXY_COOKIE_SECRET in extraEnv | `true`
|
||||
|
@ -208,3 +208,15 @@ spec:
|
||||
{{- end }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.tolerations | indent 8 }}
|
||||
{{- if semverCompare ">=1.16-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- if .Values.topologySpreadConstraints.enabled }}
|
||||
topologySpreadConstraints:
|
||||
- labelSelector:
|
||||
matchLabels:
|
||||
app: {{ template "oauth2-proxy.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
maxSkew: {{ .Values.topologySpreadConstraints.maxSkew }}
|
||||
topologyKey: {{ .Values.topologySpreadConstraints.topologyKey }}
|
||||
whenUnsatisfiable: {{ .Values.topologySpreadConstraints.whenUnsatisfiable }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
@ -186,3 +186,13 @@ htpasswdFile:
|
||||
# example:
|
||||
# entries:
|
||||
# - testuser:{SHA}EWhzdhgoYJWy0z2gyzhRYlN9DSiv
|
||||
|
||||
## Configure Pod Topology Spread Constraints
|
||||
## See https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
|
||||
## Requires Kubernetes >= v1.16
|
||||
topologySpreadConstraints:
|
||||
enabled: false
|
||||
maxSkew: 1
|
||||
# See https://kubernetes.io/docs/reference/kubernetes-api/labels-annotations-taints/
|
||||
topologyKey: topology.kubernetes.io/zone
|
||||
whenUnsatisfiable: DoNotSchedule
|
||||
|
Loading…
Reference in New Issue
Block a user