diff --git a/charts/metal-control-plane/Chart.yaml b/charts/metal-control-plane/Chart.yaml index 01fa475..c97a2cf 100644 --- a/charts/metal-control-plane/Chart.yaml +++ b/charts/metal-control-plane/Chart.yaml @@ -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 diff --git a/charts/metal-control-plane/templates/ipam.yaml b/charts/metal-control-plane/templates/ipam.yaml index 9179e48..a136d31 100644 --- a/charts/metal-control-plane/templates/ipam.yaml +++ b/charts/metal-control-plane/templates/ipam.yaml @@ -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 \ No newline at end of file + app: ipam +{{- end }} diff --git a/charts/metal-control-plane/templates/masterdata-api.yaml b/charts/metal-control-plane/templates/masterdata-api.yaml index 899eaa5..944053b 100644 --- a/charts/metal-control-plane/templates/masterdata-api.yaml +++ b/charts/metal-control-plane/templates/masterdata-api.yaml @@ -4,6 +4,7 @@ kind: Deployment metadata: name: masterdata-api spec: + replicas: {{ .Values.masterdata_api.replicas }} selector: matchLabels: app: masterdata-api @@ -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 }} diff --git a/charts/metal-control-plane/templates/metal-api.yaml b/charts/metal-control-plane/templates/metal-api.yaml index 282d849..7ae2e3a 100644 --- a/charts/metal-control-plane/templates/metal-api.yaml +++ b/charts/metal-control-plane/templates/metal-api.yaml @@ -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 }} diff --git a/charts/metal-control-plane/templates/metal-console.yaml b/charts/metal-control-plane/templates/metal-console.yaml index 3a01230..68e9135 100644 --- a/charts/metal-control-plane/templates/metal-console.yaml +++ b/charts/metal-control-plane/templates/metal-console.yaml @@ -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 }} diff --git a/charts/metal-control-plane/values.yaml b/charts/metal-control-plane/values.yaml index 20187f2..6c5e6c0 100644 --- a/charts/metal-control-plane/values.yaml +++ b/charts/metal-control-plane/values.yaml @@ -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 @@ -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