I am aware of the fact that,
“You must allow at least 48 hours of maintenance availability in a 32 day rolling window”
Hence we configured the maintenance window for the cluster to be set dynamically during cluster creation using Terraform as:
maintenance_policy {
recurring_window {
start_time = timeadd(timestamp(),”720h”)
end_time = timeadd(timestamp(),”768h”)
recurrence = “FREQ=MONTHLY”
}
}
So basically setting a monthly maintenance window wherein the start time
is 30 days from cluster creation.
We have not faced any issues with this config earlier, but when I tried using this on the 1st of March, Terraform was correctly evaluating the start_time
as the 31st of March, however GKE doesn’t and sets the start time as 2nd April, which throws an error since it is out of 32 days window.
Error: googleapi : Error 400: Error validating maintenance policy: maintenance policy would go longer than 32d without 48h maintenance availability of >=4h contiguous duration (in time range [2021-04-02T04:25:38Z, 2021-05-04T04:25:38Z])., badRequest
We tried hardcoding in several values, but observed some disparity wherein the start_time
was falling in on days like 30th and 31st of the month.
I found no docs on any exceptions for specific dates and any leads would be really appreciated!