ITADN

Support configuring maintenance windows and exclusions for managed clusters

#1625Opensalasberryfin 创建于 2026-03-19
kind/featurearea/gke
S
salasberryfincommented
/area gke /kind feature # Description The current GKE API doesn't allow configuring custom [maintenance windows and exclusions](https://docs.cloud.google.com/kubernetes-engine/docs/concepts/maintenance-windows-and-exclusions) which limits the control of automatic cluster upgrades. ### User story As a user, I would like to configure a custom maintenance policy to control how GCP auto-upgrades are applied on my workload cluster/s. ### Implementation details From the GCP Go client: `containerpb.Cluster` includes a field `MaintenancePolicy` (source code [here](https://github.com/googleapis/google-cloud-go/blob/8b758ea84d501863850063b7969d0189147f398f/container/apiv1/containerpb/cluster_service.pb.go#L9705)): ```go // MaintenancePolicy defines the maintenance policy to be used for the cluster. type MaintenancePolicy struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Specifies the maintenance window in which maintenance may be performed. Window *MaintenanceWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"` // A hash identifying the version of this policy, so that updates to fields of // the policy won't accidentally undo intermediate changes (and so that users // of the API unaware of some fields won't accidentally remove other fields). // Make a `get()` request to the cluster to get the current // resource version and include it with requests to set the policy. ResourceVersion string `protobuf:"bytes,3,opt,name=resource_version,json=resourceVersion,proto3" json:"resource_version,omitempty"` } ``` Where a user can configure `MaintenanceWindow` with their choice of [policy or exclusion](https://github.com/googleapis/google-cloud-go/blob/8b758ea84d501863850063b7969d0189147f398f/container/apiv1/containerpb/cluster_service.pb.go#L15756).
0 条评论