Files
project-infra/k8s/base/plugins/oauth2-proxy/deployment.yaml
T

116 lines
3.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: oauth2-proxy
spec:
replicas: 1
revisionHistoryLimit: 5
progressDeadlineSeconds: 600
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: oauth2-proxy
template:
metadata:
labels:
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: oauth2-proxy
spec:
serviceAccountName: oauth2-proxy-sa
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app.kubernetes.io/name: oauth2-proxy
app.kubernetes.io/instance: oauth2-proxy
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
fsGroup: 65532
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
containers:
- name: oauth2-proxy
image: quay.io/oauth2-proxy/oauth2-proxy:v7.15.2
imagePullPolicy: IfNotPresent
args:
- --config=/etc/oauth2-proxy/oauth2-proxy.cfg
ports:
- name: http
containerPort: 4180
protocol: TCP
- name: metrics
containerPort: 44180
protocol: TCP
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
memory: 256Mi
startupProbe:
httpGet:
path: /ping
port: http
periodSeconds: 5
failureThreshold: 12
timeoutSeconds: 3
readinessProbe:
httpGet:
path: /ready
port: http
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 3
livenessProbe:
httpGet:
path: /ping
port: http
periodSeconds: 15
failureThreshold: 3
timeoutSeconds: 3
securityContext:
runAsNonRoot: true
runAsUser: 65532
runAsGroup: 65532
allowPrivilegeEscalation: false
privileged: false
readOnlyRootFilesystem: true
capabilities:
drop:
- ALL
seccompProfile:
type: RuntimeDefault
volumeMounts:
- name: config
mountPath: /etc/oauth2-proxy
readOnly: true
- name: secrets
mountPath: /etc/oauth2-proxy-secrets
readOnly: true
- name: tmp
mountPath: /tmp
volumes:
- name: config
configMap:
name: oauth2-proxy-config
- name: secrets
secret:
secretName: oauth2-proxy-secrets
defaultMode: 0400
- name: tmp
emptyDir:
medium: Memory
sizeLimit: 64Mi