-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
godo/kubernetes: add maintenance policy support #224
Conversation
kubernetes.go
Outdated
|
||
func (k KubernetesMaintenancePolicyDay) MarshalJSON() ([]byte, error) { | ||
if KubernetesMaintenanceDayAny <= k && k <= KubernetesMaintenanceDaySunday { | ||
return []byte(`"` + days[k] + `"`), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, can be replaced by return json.Marshal(days[k])
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my comments got out of order. I mean like the comment I made on line 172, just replace line 178 with return json.Marshal(days[k])
This PR adds the maintenance policy support for the upcoming Maintenance Window feature on the Managed Kubernetes service.
0b49e8a
to
f8bc115
Compare
@bouk force pushed the changes, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd appreciate some tests around the (un)marshaljson, but lgtm
@bouk added tests as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
Create: ``` doctl kubernetes cluster create foo --maintenance-window monday=00:00 ``` Update: ``` doctl kubernetes cluster update foo --maintenance-window any=12:00 ``` There is no deletion of a maintenance policy as it's not needed. Depends on digitalocean/godo#224
This PR adds the maintenance policy support for the upcoming Maintenance
Window feature on the Managed Kubernetes service.