diff --git a/builtin/files/cluster.yaml.tmpl b/builtin/files/cluster.yaml.tmpl index 0b295a286..c41777121 100644 --- a/builtin/files/cluster.yaml.tmpl +++ b/builtin/files/cluster.yaml.tmpl @@ -1279,6 +1279,7 @@ kubeSystemNamespaceLabels: kubernetesDashboard: adminPrivileges: true insecureLogin: false + replicas: 1 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..0ba826c0f 100644 --- a/builtin/files/userdata/cloud-config-controller +++ b/builtin/files/userdata/cloud-config-controller @@ -4297,7 +4297,7 @@ write_files: name: kubernetes-dashboard namespace: kube-system spec: - replicas: 1 + replicas: {{ .KubernetesDashboard.Replicas }} revisionHistoryLimit: 10 selector: matchLabels: diff --git a/docs/advanced-topics/kubernetes-dashboard.md b/docs/advanced-topics/kubernetes-dashboard.md index 27f6f320e..592aecd52 100644 --- a/docs/advanced-topics/kubernetes-dashboard.md +++ b/docs/advanced-topics/kubernetes-dashboard.md @@ -7,6 +7,7 @@ kubernetesDashboard: adminPrivileges: true insecureLogin: false enabled: true + replicas: 1 resources: requests: cpu: 100m diff --git a/pkg/api/cluster.go b/pkg/api/cluster.go index 168f2fa92..6dc99b733 100644 --- a/pkg/api/cluster.go +++ b/pkg/api/cluster.go @@ -190,6 +190,7 @@ func NewDefaultCluster() *Cluster { AdminPrivileges: true, InsecureLogin: false, Enabled: true, + Replicas: 1, }, Kubernetes: Kubernetes{ Authentication: KubernetesAuthentication{ @@ -541,6 +542,7 @@ type KubernetesDashboard struct { AdminPrivileges bool `yaml:"adminPrivileges"` InsecureLogin bool `yaml:"insecureLogin"` Enabled bool `yaml:"enabled"` + Replicas int `yaml:"replicas,omitempty"` ComputeResources ComputeResources `yaml:"resources,omitempty"` }