Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion charts/github-oidc-federation/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ kind: Deployment
metadata:
name: github-oidc-federation
spec:
replicas: 1
selector:
matchLabels:
role: github-oidc-federation
Expand All @@ -30,3 +29,10 @@ spec:
- name: github-oidc-federation
secret:
secretName: github-oidc-federation
topologySpreadConstraints:
- maxSkew: 1
topologyKey: topology.kubernetes.io/zone
whenUnsatisfiable: DoNotSchedule

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whenUnsatisfiable: DoNotSchedule - dosn't this mean that when a zone goes down, the replacement pod for the lost replica may fail to schedule because the constraint cannot be satisfied? If so, rather use ScheduleAnyway?

labelSelector:
matchLabels:
role: github-oidc-federation
24 changes: 24 additions & 0 deletions charts/github-oidc-federation/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: github-oidc-federation
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: github-oidc-federation
minReplicas: {{ .Values.hpa.minReplicas }}
maxReplicas: {{ .Values.hpa.maxReplicas }}
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.hpa.cpu.averageUtilization }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.hpa.memory.averageUtilization }}
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ spec:
- ports:
- protocol: TCP
port: 3000
{{- if .Values.networkPolicy.ingressController.enabled }}
from:
- namespaceSelector:
Comment thread
8R0WNI3 marked this conversation as resolved.
matchLabels:
kubernetes.io/metadata.name: nginx-ingress
Comment thread
Michael5601 marked this conversation as resolved.
podSelector:
matchLabels:
app.kubernetes.io/component: controller
{{- end }}
10 changes: 10 additions & 0 deletions charts/github-oidc-federation/values.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
hpa:
minReplicas: 2
maxReplicas: 5
cpu:
averageUtilization: 80
memory:
averageUtilization: 80
image:
repository: europe-docker.pkg.dev/gardener-project/releases/github-oidc-federation
tag: latest
ingress:
annotations: {}
class: nginx
hosts: []
networkPolicy:
ingressController:
enabled: true
Loading