1

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!

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Shalanki Gupta
  • 131
  • 2
  • 8
  • If you believe this can be a bug in **GKE** or **googleapi**, you can [create a new issue](https://issuetracker.google.com/issues/new) at **Google's** public issue tracker. – mario Mar 25 '21 at 19:12

1 Answers1

0

You cannot have a maintenance window more than 30 days in GKE. if you have a maintenance window of more than 30 days you have to break them up into multiple exclusion windows and make sure that the diff between one end time and start time is at least 48 hours.

So for example if there is a maintenance exclusion between 2021-10-01 and 2021-12-31 it would be defined as such

exclusion-window-1: endTime: '2021-10-30T00:00:00Z' startTime: '2021-10-01T00:00:00Z'

exclusion-window-2: endTime: '2021-11-30T00:00:00Z' startTime: '2021-11-01T00:00:00Z'

exclusion-window-3: endTime: '2021-12-31T00:00:00Z' startTime: '2021-12-02T00:00:00Z'

Saby
  • 31
  • 2