(ctx context.Context, clusterName string)
| 118 | } |
| 119 | |
| 120 | func getCluster(ctx context.Context, clusterName string) (apiv1.ClusterList, error) { |
| 121 | var clusterList apiv1.ClusterList |
| 122 | var cluster apiv1.Cluster |
| 123 | err := plugin.Client.Get(ctx, client.ObjectKey{Namespace: plugin.Namespace, Name: clusterName}, &cluster) |
| 124 | if err == nil { |
| 125 | clusterList.Items = append(clusterList.Items, cluster) |
| 126 | } |
| 127 | return clusterList, err |
| 128 | } |
| 129 | |
| 130 | func patchNodeMaintenanceWindow( |
| 131 | ctx context.Context, |