Skip to content

Commit

Permalink
More configurable PDBs for metal control plane. (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Dec 13, 2024
1 parent 6237761 commit a2528f7
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/metal-control-plane/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for deploying the metal control plane in K8s
name: metal-control-plane
version: 0.4.6
version: 0.4.7
8 changes: 5 additions & 3 deletions charts/metal-control-plane/templates/ipam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,15 @@ spec:
targetPort: 2112
selector:
app: ipam
{{- if .Values.pod_disruption_budget.ipam.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: ipam-pdb
name: ipam
spec:
minAvailable: {{ .Values.pod_disruption_budget.min_available }}
minAvailable: {{ .Values.pod_disruption_budget.ipam.min_available }}
selector:
matchLabels:
app: ipam
app: ipam
{{- end }}
13 changes: 13 additions & 0 deletions charts/metal-control-plane/templates/masterdata-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ kind: Deployment
metadata:
name: masterdata-api
spec:
replicas: {{ .Values.masterdata_api.replicas }}
selector:
matchLabels:
app: masterdata-api
Expand Down Expand Up @@ -95,3 +96,15 @@ spec:
targetPort: 2112
selector:
app: masterdata-api
{{- if .Values.pod_disruption_budget.masterdata_api.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: masterdata-api
spec:
minAvailable: {{ .Values.pod_disruption_budget.masterdata_api.min_available }}
selector:
matchLabels:
app: masterdata-api
{{- end }}
12 changes: 12 additions & 0 deletions charts/metal-control-plane/templates/metal-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -595,3 +595,15 @@ spec:
name: metal-api
targetCPUUtilizationPercentage: {{ .Values.hpa.metal_api.cpu_percentage }}
{{- end }}
{{- if .Values.pod_disruption_budget.metal_api.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: metal-api
spec:
minAvailable: {{ .Values.pod_disruption_budget.metal_api.min_available }}
selector:
matchLabels:
app: metal-api
{{- end }}
12 changes: 12 additions & 0 deletions charts/metal-control-plane/templates/metal-console.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,16 @@ spec:
targetPort: 10001
selector:
app: metal-console
{{- if .Values.pod_disruption_budget.metal_console.enabled }}
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: metal-console
spec:
minAvailable: {{ .Values.pod_disruption_budget.metal_console.min_available }}
selector:
matchLabels:
app: metal-console
{{- end }}
{{- end }}
18 changes: 15 additions & 3 deletions charts/metal-control-plane/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,20 @@ hpa:
min: 3
cpu_percentage: 70

pod_disruption_budget:
ipam:
enabled: true
min_available: 1
metal_api:
enabled: true
min_available: 2
masterdata_api:
enabled: true
min_available: 1
metal_console:
enabled: false
min_available: 1

ports:
metal_api: 8080
metal_api_grpc: 50051
Expand Down Expand Up @@ -136,10 +150,8 @@ ipam:
db_user: ""
db_password: ""

pod_disruption_budget:
min_available: 1

masterdata_api:
replicas: 2
provider_tenant: ""
db_address: ""
db_port: 5432
Expand Down

0 comments on commit a2528f7

Please sign in to comment.