Compare commits

...

3 Commits

Author SHA1 Message Date
stretched
8a5bd34f6a [powerdns] Webserver container port, and startup script fixes (#498) 2021-01-17 19:24:17 -05:00
ᗪєνιη ᗷυнʟ
af7c2fcfe8 [oauth2-proxy] change image to new home and bump image version (#497) 2021-01-14 18:29:59 -05:00
Stephan
7f01d91432 [oauth2-proxy] Add support for topologySpreadConstraints (#496)
Signed-off-by: Stephan Austermühle <au@hcsd.de>
2021-01-14 15:57:07 -05:00
6 changed files with 36 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
name: oauth2-proxy
version: 4.1.0
version: 4.3.0
apiVersion: v1
appVersion: 5.1.0
home: https://oauth2-proxy.github.io/oauth2-proxy/

View File

@@ -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`

View File

@@ -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 }}

View File

@@ -9,7 +9,7 @@ config:
# Use an existing secret for OAuth2 credentials (see secret.yaml for required fields)
# Example:
# existingSecret: secret
cookieSecret: "XXXXXXXXXX"
cookieSecret: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
google: {}
# adminEmail: xxxx
# serviceAccountJson: xxxx
@@ -29,8 +29,8 @@ config:
# existingConfig: config
image:
repository: "quay.io/pusher/oauth2_proxy"
tag: "v5.1.0"
repository: "quay.io/oauth2-proxy/oauth2-proxy"
tag: "v6.1.1"
pullPolicy: "IfNotPresent"
# Optionally specify an array of imagePullSecrets.
@@ -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

View File

@@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v4.3.1
description: PowerDNS is a DNS server, written in C++ and licensed under the GPL. It runs on most Unix derivatives. PowerDNS features a large number of different backends ranging from simple BIND style zonefiles to relational databases and load balancing/failover algorithms. A DNS recursor is provided as a separate program.
name: powerdns
version: 3.0.1
version: 3.0.2
home: https://www.powerdns.com/
sources:
- http://www.github.com/PowerDNS/

View File

@@ -94,6 +94,9 @@ spec:
- name: dns-udp
containerPort: 53
protocol: UDP
- name: dns-webserver
containerPort: 8081
protocol: TCP
{{- if .Values.probes.liveness.enabled }}
livenessProbe:
tcpSocket:
@@ -121,13 +124,13 @@ spec:
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "a=0;while [ $a -lt 200 ];do sleep 5;a=$[a+1];echo 'stage: '$a;if nc -vz {{- printf "%s-%s" .Release.Name "mariadb"}} 3306;then (! pdnsutil list-zone {{ .Values.powerdns.domain }} 2>/dev/null) && pdnsutil create-zone {{ .Values.powerdns.domain }};echo 'End Stage';a=200;fi;done"]
command: ["/bin/sh", "-c", "let a=0; while [ $a -lt 200 ]; do sleep 5; let a=a+1; echo 'Attempt: '$a; if nc -vz {{ printf "%s-%s" .Release.Name "mariadb"}} 3306; then pdnsutil list-zone {{ .Values.powerdns.domain }} 2>/dev/null && break; pdnsutil create-zone {{ .Values.powerdns.domain }}; fi; done"]
{{ end }}
{{- if .Values.postgresql.enabled }}
lifecycle:
postStart:
exec:
command: ["/bin/sh", "-c", "a=0;while [ $a -lt 200 ];do sleep 5;a=$[a+1];echo 'stage: '$a;if nc -vz {{- printf "%s-%s" .Release.Name "postgresql"}} 5432;then (! pdnsutil list-zone {{ .Values.powerdns.domain }} 2>/dev/null) && pdnsutil create-zone {{ .Values.powerdns.domain }};echo 'End Stage';a=200;fi;done"]
command: ["/bin/sh", "-c", "let a=0; while [ $a -lt 200 ]; do sleep 5; let a=a+1; echo 'Attempt: '$a; if nc -vz {{ printf "%s-%s" .Release.Name "postgresql"}} 5432; then pdnsutil list-zone {{ .Values.powerdns.domain }} 2>/dev/null && break; pdnsutil create-zone {{ .Values.powerdns.domain }}; fi; done"]
{{ end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}