From 220cbf8ac103e0b2982ba46591674075d288b39e Mon Sep 17 00:00:00 2001 From: kylehodgetts Date: Tue, 15 Jan 2019 14:25:09 +0000 Subject: [PATCH 1/3] Bump default kubernetes dashboard version and introduce option to skip login --- builtin/files/cluster.yaml.tmpl | 3 ++- builtin/files/userdata/cloud-config-controller | 3 +++ pkg/api/cluster.go | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/builtin/files/cluster.yaml.tmpl b/builtin/files/cluster.yaml.tmpl index 0b295a286..6d32bde6d 100644 --- a/builtin/files/cluster.yaml.tmpl +++ b/builtin/files/cluster.yaml.tmpl @@ -1152,7 +1152,7 @@ worker: # Kube Dashboard image repository to use. #kubernetesDashboardImage: # repo: k8s.gcr.io/kubernetes-dashboard-amd64 -# tag: v1.8.3 +# tag: v1.10.1 # rktPullDocker: false # Pause image repository to use.This works only if you are deploying your cluster in "cn-north-1" region. @@ -1279,6 +1279,7 @@ kubeSystemNamespaceLabels: kubernetesDashboard: adminPrivileges: true insecureLogin: false + allowSkip: false enabled: true # # Optional resource change for Dashboard can be done via using the resources block below and changing the values. # # Values below are the default already if not set. diff --git a/builtin/files/userdata/cloud-config-controller b/builtin/files/userdata/cloud-config-controller index 0cfb502e0..80c714c66 100644 --- a/builtin/files/userdata/cloud-config-controller +++ b/builtin/files/userdata/cloud-config-controller @@ -4327,6 +4327,9 @@ write_files: {{ else }} - --auto-generate-certificates {{ end }} + {{ if .KubernetesDashboard.AllowSkip }} + - --enable-skip-login + {{ end }} resources: requests: cpu: {{ if .KubernetesDashboard.ComputeResources.Requests.Cpu }}{{ .KubernetesDashboard.ComputeResources.Requests.Cpu }}{{ else }}100m{{ end }} diff --git a/pkg/api/cluster.go b/pkg/api/cluster.go index 168f2fa92..2421ba5b1 100644 --- a/pkg/api/cluster.go +++ b/pkg/api/cluster.go @@ -189,6 +189,7 @@ func NewDefaultCluster() *Cluster { KubernetesDashboard: KubernetesDashboard{ AdminPrivileges: true, InsecureLogin: false, + AllowSkip: false, Enabled: true, }, Kubernetes: Kubernetes{ @@ -233,7 +234,7 @@ func NewDefaultCluster() *Cluster { HeapsterImage: Image{Repo: "k8s.gcr.io/heapster", Tag: "v1.5.0", RktPullDocker: false}, MetricsServerImage: Image{Repo: "k8s.gcr.io/metrics-server-amd64", Tag: "v0.2.1", RktPullDocker: false}, AddonResizerImage: Image{Repo: "k8s.gcr.io/addon-resizer", Tag: "1.8.1", RktPullDocker: false}, - KubernetesDashboardImage: Image{Repo: "k8s.gcr.io/kubernetes-dashboard-amd64", Tag: "v1.8.3", RktPullDocker: false}, + KubernetesDashboardImage: Image{Repo: "k8s.gcr.io/kubernetes-dashboard-amd64", Tag: "v1.10.1", RktPullDocker: false}, PauseImage: Image{Repo: "k8s.gcr.io/pause-amd64", Tag: "3.1", RktPullDocker: false}, JournaldCloudWatchLogsImage: Image{Repo: "jollinshead/journald-cloudwatch-logs", Tag: "0.1", RktPullDocker: true}, }, @@ -540,6 +541,7 @@ type Cluster struct { type KubernetesDashboard struct { AdminPrivileges bool `yaml:"adminPrivileges"` InsecureLogin bool `yaml:"insecureLogin"` + AllowSkip bool `yaml:"allowSkip"` Enabled bool `yaml:"enabled"` ComputeResources ComputeResources `yaml:"resources,omitempty"` } From 0d61cea6bbb766d687f656c3d49f6d03fa6ba48d Mon Sep 17 00:00:00 2001 From: kylehodgetts Date: Tue, 15 Jan 2019 14:56:34 +0000 Subject: [PATCH 2/3] rename allowSkip to allowSkipLogin --- builtin/files/cluster.yaml.tmpl | 2 +- builtin/files/userdata/cloud-config-controller | 2 +- pkg/api/cluster.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/files/cluster.yaml.tmpl b/builtin/files/cluster.yaml.tmpl index 6d32bde6d..ac1ecdddd 100644 --- a/builtin/files/cluster.yaml.tmpl +++ b/builtin/files/cluster.yaml.tmpl @@ -1279,7 +1279,7 @@ kubeSystemNamespaceLabels: kubernetesDashboard: adminPrivileges: true insecureLogin: false - allowSkip: false + allowSkipLogin: false enabled: true # # Optional resource change for Dashboard can be done via using the resources block below and changing the values. # # Values below are the default already if not set. diff --git a/builtin/files/userdata/cloud-config-controller b/builtin/files/userdata/cloud-config-controller index 80c714c66..6cca6b33c 100644 --- a/builtin/files/userdata/cloud-config-controller +++ b/builtin/files/userdata/cloud-config-controller @@ -4327,7 +4327,7 @@ write_files: {{ else }} - --auto-generate-certificates {{ end }} - {{ if .KubernetesDashboard.AllowSkip }} + {{ if .KubernetesDashboard.AllowSkipLogin }} - --enable-skip-login {{ end }} resources: diff --git a/pkg/api/cluster.go b/pkg/api/cluster.go index 2421ba5b1..09f3cf63e 100644 --- a/pkg/api/cluster.go +++ b/pkg/api/cluster.go @@ -189,7 +189,7 @@ func NewDefaultCluster() *Cluster { KubernetesDashboard: KubernetesDashboard{ AdminPrivileges: true, InsecureLogin: false, - AllowSkip: false, + AllowSkipLogin: false, Enabled: true, }, Kubernetes: Kubernetes{ @@ -541,7 +541,7 @@ type Cluster struct { type KubernetesDashboard struct { AdminPrivileges bool `yaml:"adminPrivileges"` InsecureLogin bool `yaml:"insecureLogin"` - AllowSkip bool `yaml:"allowSkip"` + AllowSkipLogin bool `yaml:"allowSkipLogin"` Enabled bool `yaml:"enabled"` ComputeResources ComputeResources `yaml:"resources,omitempty"` } From 657393106eebde5e4cd624cbfc7c345b9a3ab161 Mon Sep 17 00:00:00 2001 From: kylehodgetts Date: Wed, 16 Jan 2019 10:03:52 +0000 Subject: [PATCH 3/3] update docs --- docs/advanced-topics/kubernetes-dashboard.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/advanced-topics/kubernetes-dashboard.md b/docs/advanced-topics/kubernetes-dashboard.md index 27f6f320e..80b3357a5 100644 --- a/docs/advanced-topics/kubernetes-dashboard.md +++ b/docs/advanced-topics/kubernetes-dashboard.md @@ -6,6 +6,7 @@ kubernetesDashboard: adminPrivileges: true insecureLogin: false + allowSkipLogin: false # Only set to true when using dashboard image version v1.10.1+ enabled: true resources: requests: @@ -59,6 +60,7 @@ You can override these by changing the values as necessary. kubernetesDashboard: adminPrivileges: false insecureLogin: false + allowSkipLogin: false # Only set to true when using dashboard image version v1.10.1+ ``` Ex. @@ -90,6 +92,7 @@ spec: kubernetesDashboard: adminPrivileges: false insecureLogin: true + allowSkipLogin: false # Only set to true when using dashboard image version v1.10.1+ ``` Ex. @@ -126,6 +129,7 @@ spec: kubernetesDashboard: adminPrivileges: false insecureLogin: true + allowSkipLogin: false # Only set to true when using dashboard image version v1.10.1+ ``` Ex.