Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable high availability (HA) configuration for ASO #4445

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ metadata:
name: azureserviceoperator-controller-manager
namespace: {{ .Release.Namespace }}
spec:
replicas: 1
replicas: {{ .Values.replicaCount }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
selector:
matchLabels:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
app.kubernetes.io/name: azure-service-operator
control-plane: controller-manager
name: azureserviceoperator-pdb
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
control-plane: controller-manager
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
{{- end }}
10 changes: 10 additions & 0 deletions v2/charts/azure-service-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ nodeSelector:
# podAnnotations contain the pod annotations for Azure Service Operator
podAnnotations: {}

# Enable the pod disruption budget
# Specifies the minimum number of pods that must be available at any given time during the disruption.
# Ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/
podDisruptionBudget:
enabled: true
minAvailable: 50%

# Labels to be added to the pod
podLabels: {}

Expand All @@ -176,6 +183,9 @@ podSecurityContext: {}
# Assign a PriorityClassName to pods if set
priorityClassName: ""

# Number of pod replicas to create for the deployment
replicaCount: 2

# Recomended initial values for resources
# adjust them as necessary
resources:
Expand Down
1 change: 1 addition & 0 deletions v2/config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namePrefix: azureserviceoperator-
resources:
- manager.yaml
- manager_metrics_service.yaml
- manager_pod_disruption_budget.yaml

patchesStrategicMerge:
- manager_image_patch.yaml
Expand Down
2 changes: 1 addition & 1 deletion v2/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
selector:
matchLabels:
control-plane: controller-manager
replicas: 1
replicas: 2
revisionHistoryLimit: 10
template:
metadata:
Expand Down
12 changes: 12 additions & 0 deletions v2/config/manager/manager_pod_disruption_budget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: controller-manager
namespace: system
labels:
control-plane: controller-manager
spec:
selector:
matchLabels:
control-plane: controller-manager
minAvailable: 50%