Skip to content
Merged
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
1 change: 1 addition & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ shouldnot
decorder
overriden
wit
ist
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this for MaintenanceList?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It was due to the MaintenanceConfiguration CRD which had this docstring: UtcOffset: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ WEBHOOK_ROOT ?= $(MANIFEST_ROOT)/webhook
RBAC_ROOT ?= $(MANIFEST_ROOT)/rbac
ASO_CRDS_PATH := $(MANIFEST_ROOT)/aso/crds.yaml
ASO_VERSION := $(shell go list -m -f '{{ .Version }}' github.com/Azure/azure-service-operator/v2)
ASO_CRDS := resourcegroups.resources.azure.com natgateways.network.azure.com managedclusters.containerservice.azure.com managedclustersagentpools.containerservice.azure.com bastionhosts.network.azure.com virtualnetworks.network.azure.com virtualnetworkssubnets.network.azure.com privateendpoints.network.azure.com fleetsmembers.containerservice.azure.com extensions.kubernetesconfiguration.azure.com
ASO_CRDS := resourcegroups.resources.azure.com natgateways.network.azure.com managedclusters.containerservice.azure.com managedclustersagentpools.containerservice.azure.com bastionhosts.network.azure.com virtualnetworks.network.azure.com virtualnetworkssubnets.network.azure.com privateendpoints.network.azure.com fleetsmembers.containerservice.azure.com extensions.kubernetesconfiguration.azure.com maintenanceconfigurations.containerservice.azure.com

# Allow overriding the imagePullPolicy
PULL_POLICY ?= Always
Expand Down
2,159 changes: 2,159 additions & 0 deletions config/aso/crds.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions config/aso/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ patches:
- path: patches/visualizer_label_in_fleetmembers.yaml
- path: patches/visualizer_label_in_managedclusteragentpools.yaml
- path: patches/visualizer_label_in_managed_clusters.yaml
- path: patches/visualizer_label_in_maintenanceconfigurations.yaml
- path: patches/visualizer_label_in_natgateways.yaml
- path: patches/visualizer_label_in_privateendpoints.yaml
- path: patches/visualizer_label_in_resourcegroups.yaml
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
visualizer.cluster.x-k8s.io: ""
visualizer.cluster.x-k8s.io/provider-type: "infrastructure"
name: maintenanceconfigurations.containerservice.azure.com
2 changes: 2 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ rules:
- containerservice.azure.com
resources:
- fleetsmembers
- maintenanceconfigurations
- managedclusters
- managedclustersagentpools
verbs:
Expand All @@ -137,6 +138,7 @@ rules:
- containerservice.azure.com
resources:
- fleetsmembers/status
- maintenanceconfigurations/status
- managedclusters/status
- managedclustersagentpools/status
verbs:
Expand Down
2 changes: 2 additions & 0 deletions controllers/azuremanagedcontrolplane_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ func (amcpr *AzureManagedControlPlaneReconciler) SetupWithManager(ctx context.Co
// +kubebuilder:rbac:groups=network.azure.com,resources=privateendpoints/status;virtualnetworks/status;virtualnetworkssubnets/status,verbs=get;list;watch
// +kubebuilder:rbac:groups=containerservice.azure.com,resources=fleetsmembers,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=containerservice.azure.com,resources=fleetsmembers/status,verbs=get;list;watch
// +kubebuilder:rbac:groups=containerservice.azure.com,resources=maintenanceconfigurations,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=containerservice.azure.com,resources=maintenanceconfigurations/status,verbs=get;list;watch
// +kubebuilder:rbac:groups=kubernetesconfiguration.azure.com,resources=extensions,verbs=get;list;watch;create;update;patch;delete
// +kubebuilder:rbac:groups=kubernetesconfiguration.azure.com,resources=extensions/status,verbs=get;list;watch

Expand Down
194 changes: 194 additions & 0 deletions templates/cluster-template-aks-aso-maintenance.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

81 changes: 81 additions & 0 deletions templates/flavors/aks-aso-maintenance/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: default
resources:
- ../aks-aso

patches:
- patch: |-
- op: test
path: /spec/resources/0/kind
value: ManagedCluster
- op: add
path: /spec/resources/-
value:
apiVersion: containerservice.azure.com/v1api20240901
kind: MaintenanceConfiguration
metadata:
name: ${CLUSTER_NAME}-default
annotations:
serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
spec:
azureName: default
owner:
name: ${CLUSTER_NAME}
timeInWeek:
- day: Sunday
hourSlots:
- 0
- 1
- 2
- 3
- op: add
path: /spec/resources/-
value:
apiVersion: containerservice.azure.com/v1api20240901
kind: MaintenanceConfiguration
metadata:
name: ${CLUSTER_NAME}-aksmanagedautoupgradeschedule
annotations:
serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
spec:
azureName: aksManagedAutoUpgradeSchedule
owner:
name: ${CLUSTER_NAME}
maintenanceWindow:
durationHours: 4
utcOffset: "-05:00"
startTime: "02:00"
schedule:
weekly:
intervalWeeks: 1
dayOfWeek: Sunday
notAllowedDates:
- start: "2026-12-23"
end: "2026-12-26"
- op: add
path: /spec/resources/-
value:
apiVersion: containerservice.azure.com/v1api20240901
kind: MaintenanceConfiguration
metadata:
name: ${CLUSTER_NAME}-aksmanagednodeosupgradeschedule
annotations:
serviceoperator.azure.com/credential-from: ${ASO_CREDENTIAL_SECRET_NAME}
spec:
azureName: aksManagedNodeOSUpgradeSchedule
owner:
name: ${CLUSTER_NAME}
maintenanceWindow:
durationHours: 4
utcOffset: "-05:00"
startTime: "02:00"
schedule:
weekly:
intervalWeeks: 1
dayOfWeek: Sunday
target:
kind: AzureASOManagedControlPlane

sortOptions:
order: fifo
Loading
Loading