Skip to content

Commit e0198e5

Browse files
Merge branch 'main' into traffic-policy
2 parents 8417ee0 + f228e71 commit e0198e5

File tree

7 files changed

+230
-157
lines changed

7 files changed

+230
-157
lines changed

helm/oauth2-proxy/Chart.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
22
- name: redis
33
repository: https://charts.bitnami.com/bitnami
4-
version: 19.1.0
5-
digest: sha256:1e01e554e7daa71d9bbac35ddcadfbd90bfc2fa8c9e58dfacadd5c8fc247997f
6-
generated: "2024-04-08T18:33:48.333436+02:00"
4+
version: 19.5.0
5+
digest: sha256:d4fa94767e06b9a0816302bcc522377f2b3e9830131232d5b1f76c788c43f758
6+
generated: "2024-05-24T12:50:23.870617+02:00"

helm/oauth2-proxy/Chart.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: oauth2-proxy
2-
version: 7.5.4
2+
version: 7.6.1
33
apiVersion: v2
44
appVersion: 7.6.0
55
home: https://oauth2-proxy.github.io/oauth2-proxy/
@@ -14,7 +14,7 @@ keywords:
1414
- redis
1515
dependencies:
1616
- name: redis
17-
version: 19.1.0
17+
version: 19.5.0
1818
repository: https://charts.bitnami.com/bitnami
1919
alias: redis
2020
condition: redis.enabled
@@ -34,8 +34,8 @@ maintainers:
3434
kubeVersion: ">=1.9.0-0"
3535
annotations:
3636
artifacthub.io/changes: |
37-
- kind: changed
38-
description: Wait for redis script fixes for cluster and sentinel
37+
- kind: fixed
38+
description: Fixed test for horizontal autoscaling feature
3939
links:
4040
- name: Github PR
41-
url: https://github.com/oauth2-proxy/manifests/issues/205
41+
url: https://github.com/oauth2-proxy/manifests/pull/211

helm/oauth2-proxy/README.md

Lines changed: 167 additions & 149 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Enables Horizontal Pod Autoscaler and removes replica count in deployment
2+
autoscaling:
3+
enabled: true
4+
annotations:
5+
test-annotations/test: "true"

helm/oauth2-proxy/templates/deployment.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ metadata:
1111
name: {{ template "oauth2-proxy.fullname" . }}
1212
namespace: {{ template "oauth2-proxy.namespace" $ }}
1313
spec:
14+
{{- if not .Values.autoscaling.enabled }}
1415
replicas: {{ .Values.replicaCount }}
16+
{{- end }}
1517
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
1618
{{- with .Values.strategy }}
1719
strategy:
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
labels:
6+
app: {{ template "oauth2-proxy.name" . }}
7+
{{- include "oauth2-proxy.labels" . | indent 4 }}
8+
{{- if .Values.autoscaling.annotations }}
9+
annotations:
10+
{{ toYaml .Values.autoscaling.annotations | indent 8 }}
11+
{{- end }}
12+
name: {{ template "oauth2-proxy.fullname" . }}
13+
namespace: {{ template "oauth2-proxy.namespace" $ }}
14+
spec:
15+
scaleTargetRef:
16+
apiVersion: apps/v1
17+
kind: Deployment
18+
name: {{ template "oauth2-proxy.name" . }}
19+
minReplicas: {{ .Values.autoscaling.minReplicas }}
20+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
21+
metrics:
22+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
23+
- type: Resource
24+
resource:
25+
name: cpu
26+
target:
27+
type: Utilization
28+
averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
29+
{{- end }}
30+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
31+
- type: Resource
32+
resource:
33+
name: memory
34+
target:
35+
type: Utilization
36+
averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
37+
{{- end }}
38+
{{- end }}

helm/oauth2-proxy/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,16 @@ podDisruptionBudget:
282282
enabled: true
283283
minAvailable: 1
284284

285+
## Horizontal Pod Autoscaling
286+
## ref: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
287+
autoscaling:
288+
enabled: false
289+
minReplicas: 1
290+
maxReplicas: 10
291+
targetCPUUtilizationPercentage: 80
292+
# targetMemoryUtilizationPercentage: 80
293+
annotations: {}
294+
285295
# Configure Kubernetes security context for pod
286296
# Ref: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
287297
podSecurityContext: {}

0 commit comments

Comments
 (0)