Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

serverinstall/k8s: update log msg and add terminal warn for RollingUpdate #1886

Merged
merged 4 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1886.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:improvement
serverinstall/k8s: add information to cli output for upgrade path
```
12 changes: 9 additions & 3 deletions internal/serverinstall/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func (i *K8sInstaller) Upgrade(

log.Info("Pod(s) deleted, k8s will now restart waypoint server ", serverName)
} else if waypointStatefulSet.Spec.UpdateStrategy.Type == "RollingUpdate" {
log.Info("Update Strategy is 'RollingUpdate', no further action required")
log.Info("Update Strategy is 'RollingUpdate'; once the upgrade completes, you may need to restart the pod to update the server image")
} else {
log.Warn("Update Strategy is not recognized, so no action is taken", "UpdateStrategy",
waypointStatefulSet.Spec.UpdateStrategy.Type)
Expand Down Expand Up @@ -561,8 +561,14 @@ func (i *K8sInstaller) Upgrade(
}

if waypointStatefulSet.Spec.UpdateStrategy.Type == "RollingUpdate" {
ui.Output("\nKubernetes is now set to upgrade waypoint server image with its\n" +
"'RollingUpdate' strategy. This means the pod might not be updated immediately.")
ui.Output("\nKubernetes is now set to upgrade waypoint server image with its\n"+
"'RollingUpdate' strategy. This means the pod might not be updated immediately.",
terminal.WithWarningStyle(),
)
s.Update("Update Strategy is 'RollingUpdate'; once the upgrade completes, you may need to restart the pod to update the server image")
s.Status(terminal.StatusWarn)
s.Done()
s = sg.Add("")
}
s.Update("Upgrade complete!")
s.Done()
Expand Down