From 2f6aaa8efbed2032563c6dacbd2e5c2bb2958249 Mon Sep 17 00:00:00 2001 From: Philipp Sauter <46172817+sauterp@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:58:43 +0200 Subject: [PATCH] sks show: display whether auto-upgrade is enabled (#534) Co-authored-by: Philipp Sauter --- CHANGELOG.md | 8 +++++++- cmd/sks_show.go | 3 +++ cmd/sks_update.go | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 446f835df..666d2951a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## UNRELEASED + +### Improvements + +- sks show: display whether auto-upgrade is enabled #534 + ## 1.72.1 ### Deprecations @@ -12,7 +18,7 @@ - compute: remmove uri and tlssni fields when nlb service healthcheck is "tcp" - cmd: fix panic if inexistent config file is given (#530) -## Improvements +### Improvements - release: automate AUR releases for Arch Linux (#531) diff --git a/cmd/sks_show.go b/cmd/sks_show.go index a764553dc..1db38e54f 100644 --- a/cmd/sks_show.go +++ b/cmd/sks_show.go @@ -21,6 +21,7 @@ type sksShowOutput struct { Name string `json:"name"` Description string `json:"description"` CreationDate string `json:"creation_date"` + AutoUpgrade bool `json:"auto_upgrade"` Zone string `json:"zone"` Endpoint string `json:"endpoint"` Version string `json:"version"` @@ -44,6 +45,7 @@ func (o *sksShowOutput) ToTable() { t.Append([]string{"Description", o.Description}) t.Append([]string{"Zone", o.Zone}) t.Append([]string{"Creation Date", o.CreationDate}) + t.Append([]string{"Auto-upgrade", fmt.Sprint(o.AutoUpgrade)}) t.Append([]string{"Endpoint", o.Endpoint}) t.Append([]string{"Version", o.Version}) t.Append([]string{"Service Level", o.ServiceLevel}) @@ -137,6 +139,7 @@ func (c *sksShowCmd) cmdRun(_ *cobra.Command, _ []string) error { }(), CNI: utils.DefaultString(cluster.CNI, "-"), CreationDate: cluster.CreatedAt.String(), + AutoUpgrade: *cluster.AutoUpgrade, Description: utils.DefaultString(cluster.Description, ""), Endpoint: *cluster.Endpoint, ID: *cluster.ID, diff --git a/cmd/sks_update.go b/cmd/sks_update.go index 1a9320f0d..d180f92c1 100644 --- a/cmd/sks_update.go +++ b/cmd/sks_update.go @@ -20,7 +20,7 @@ type sksUpdateCmd struct { Cluster string `cli-arg:"#" cli-usage:"NAME|ID"` - AutoUpgrade bool `cli-usage:"enable automatic upgrading of the SKS cluster control plane Kubernetes version"` + AutoUpgrade bool `cli-usage:"enable automatic upgrading of the SKS cluster control plane Kubernetes version(--auto-upgrade=false to disable again)"` Description string `cli-usage:"SKS cluster description"` Labels map[string]string `cli-flag:"label" cli-usage:"SKS cluster label (format: key=value)"` Name string `cli-usage:"SKS cluster name"`