Skip to content
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

Merged
merged 3 commits into from
Apr 18, 2019

Conversation

fatih
Copy link
Contributor

@fatih fatih commented Apr 15, 2019

This PR adds the maintenance policy support for the upcoming Maintenance
Window feature on the Managed Kubernetes service.

kubernetes.go Outdated

func (k KubernetesMaintenancePolicyDay) MarshalJSON() ([]byte, error) {
if KubernetesMaintenanceDayAny <= k && k <= KubernetesMaintenanceDaySunday {
return []byte(`"` + days[k] + `"`), nil
Copy link
Contributor

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]).

Copy link
Contributor Author

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?

Copy link
Contributor

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.
@fatih fatih force-pushed the kubernetes-maintenance-policy branch from 0b49e8a to f8bc115 Compare April 15, 2019 10:58
@fatih
Copy link
Contributor Author

fatih commented Apr 15, 2019

@bouk force pushed the changes, PTAL.

Copy link
Contributor

@bouk bouk left a 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

@fatih
Copy link
Contributor Author

fatih commented Apr 15, 2019

@bouk added tests as well.

Copy link
Contributor

@bouk bouk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

fatih added a commit to digitalocean/doctl that referenced this pull request Apr 16, 2019
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
Copy link
Contributor

@hilary hilary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question...

Copy link
Contributor

@hilary hilary left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@fatih fatih merged commit c8e2ec8 into master Apr 18, 2019
@fatih fatih deleted the kubernetes-maintenance-policy branch April 18, 2019 09:57
fatih added a commit to digitalocean/doctl that referenced this pull request Apr 18, 2019
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
fatih added a commit to digitalocean/doctl that referenced this pull request Apr 18, 2019
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
fatih added a commit to digitalocean/doctl that referenced this pull request Apr 18, 2019
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
fatih added a commit to digitalocean/doctl that referenced this pull request Apr 23, 2019
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
fatih added a commit to digitalocean/doctl that referenced this pull request Apr 24, 2019
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants