From 64f1e73a2506b416fb368d4b3348e8aff56e077f Mon Sep 17 00:00:00 2001 From: Ruslan Gustomiasov Date: Sat, 10 Aug 2019 14:35:31 +0200 Subject: [PATCH] Addon heaspter is not in use Fixes #5017. As per discussion, needed a rebase and this PR is rebased to latest master. --- cmd/minikube/cmd/config/addons.go | 2 +- cmd/minikube/cmd/config/config.go | 6 -- cmd/minikube/cmd/config/util_test.go | 4 - deploy/addons/heapster/grafana-svc.yaml.tmpl | 34 --------- deploy/addons/heapster/heapster-rc.yaml.tmpl | 54 ------------- deploy/addons/heapster/heapster-svc.yaml.tmpl | 31 -------- .../heapster/influx-grafana-rc.yaml.tmpl | 75 ------------------- deploy/addons/heapster/influxdb-svc.yaml.tmpl | 34 --------- pkg/minikube/assets/addons.go | 32 -------- .../en/docs/Reference/Commands/addons.md | 2 +- .../en/docs/Reference/Commands/config.md | 1 - .../docs/Reference/Configuration/minikube.md | 1 - site/content/en/docs/Tasks/addons.md | 2 - 13 files changed, 2 insertions(+), 276 deletions(-) delete mode 100644 deploy/addons/heapster/grafana-svc.yaml.tmpl delete mode 100644 deploy/addons/heapster/heapster-rc.yaml.tmpl delete mode 100644 deploy/addons/heapster/heapster-svc.yaml.tmpl delete mode 100644 deploy/addons/heapster/influx-grafana-rc.yaml.tmpl delete mode 100644 deploy/addons/heapster/influxdb-svc.yaml.tmpl diff --git a/cmd/minikube/cmd/config/addons.go b/cmd/minikube/cmd/config/addons.go index e176f7dfc2e6..ddcf9ae07616 100644 --- a/cmd/minikube/cmd/config/addons.go +++ b/cmd/minikube/cmd/config/addons.go @@ -25,7 +25,7 @@ import ( var AddonsCmd = &cobra.Command{ Use: "addons SUBCOMMAND [flags]", Short: "Modify minikube's kubernetes addons", - Long: `addons modifies minikube addons files using subcommands like "minikube addons enable heapster"`, + Long: `addons modifies minikube addons files using subcommands like "minikube addons enable dashboard"`, Run: func(cmd *cobra.Command, args []string) { if err := cmd.Help(); err != nil { glog.Errorf("help: %v", err) diff --git a/cmd/minikube/cmd/config/config.go b/cmd/minikube/cmd/config/config.go index d76fe8a9f99f..ebfdec64e4d8 100644 --- a/cmd/minikube/cmd/config/config.go +++ b/cmd/minikube/cmd/config/config.go @@ -159,12 +159,6 @@ var settings = []Setting{ validations: []setFn{IsValidAddon}, callbacks: []setFn{EnableOrDisableStorageClasses}, }, - { - name: "heapster", - set: SetBool, - validations: []setFn{IsValidAddon}, - callbacks: []setFn{EnableOrDisableAddon}, - }, { name: "efk", set: SetBool, diff --git a/cmd/minikube/cmd/config/util_test.go b/cmd/minikube/cmd/config/util_test.go index 3cbab76a388c..b1ac3f0af69f 100644 --- a/cmd/minikube/cmd/config/util_test.go +++ b/cmd/minikube/cmd/config/util_test.go @@ -91,10 +91,6 @@ func TestIsAddonAlreadySet(t *testing.T) { addonName: "ingress", expectErr: "addon ingress was already ", }, - { - addonName: "heapster", - expectErr: "addon heapster was already ", - }, } for _, test := range testCases { diff --git a/deploy/addons/heapster/grafana-svc.yaml.tmpl b/deploy/addons/heapster/grafana-svc.yaml.tmpl deleted file mode 100644 index 61341604ab11..000000000000 --- a/deploy/addons/heapster/grafana-svc.yaml.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Service -metadata: - labels: - kubernetes.io/name: monitoring-grafana - kubernetes.io/minikube-addons: heapster - kubernetes.io/minikube-addons-endpoint: heapster - addonmanager.kubernetes.io/mode: Reconcile - name: monitoring-grafana - namespace: kube-system -spec: - type: NodePort - ports: - - port: 80 - nodePort: 30002 - protocol: TCP - targetPort: ui - selector: - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: influx-grafana diff --git a/deploy/addons/heapster/heapster-rc.yaml.tmpl b/deploy/addons/heapster/heapster-rc.yaml.tmpl deleted file mode 100644 index 3eeb3cc2029e..000000000000 --- a/deploy/addons/heapster/heapster-rc.yaml.tmpl +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 2017 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ReplicationController -metadata: - labels: - k8s-app: heapster - kubernetes.io/minikube-addons: heapster - addonmanager.kubernetes.io/mode: Reconcile - version: v1.5.3 - name: heapster - namespace: kube-system -spec: - replicas: 1 - selector: - k8s-app: heapster - version: v1.5.3 - addonmanager.kubernetes.io/mode: Reconcile - template: - metadata: - labels: - k8s-app: heapster - version: v1.5.3 - addonmanager.kubernetes.io/mode: Reconcile - spec: - containers: - - name: heapster - image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-{{.Arch}}:v1.5.3 - imagePullPolicy: IfNotPresent - command: - - /heapster - - --source=kubernetes.summary_api:'' - - --sink=influxdb:http://monitoring-influxdb:8086 - - --metric_resolution=60s - volumeMounts: - - name: ssl-certs - mountPath: /etc/ssl/certs - readOnly: true - volumes: - - name: ssl-certs - hostPath: - path: /etc/ssl/certs diff --git a/deploy/addons/heapster/heapster-svc.yaml.tmpl b/deploy/addons/heapster/heapster-svc.yaml.tmpl deleted file mode 100644 index 9322781cfbae..000000000000 --- a/deploy/addons/heapster/heapster-svc.yaml.tmpl +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright 2017 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Service -metadata: - labels: - kubernetes.io/name: heapster - kubernetes.io/minikube-addons: heapster - addonmanager.kubernetes.io/mode: Reconcile - kubernetes.io/minikube-addons-endpoint: heapster - name: heapster - namespace: kube-system -spec: - ports: - - port: 80 - targetPort: 8082 - selector: - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: heapster diff --git a/deploy/addons/heapster/influx-grafana-rc.yaml.tmpl b/deploy/addons/heapster/influx-grafana-rc.yaml.tmpl deleted file mode 100644 index bfd2bcdd1bb3..000000000000 --- a/deploy/addons/heapster/influx-grafana-rc.yaml.tmpl +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 2017 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: ReplicationController -metadata: - name: influxdb-grafana - labels: - k8s-app: influx-grafana - kubernetes.io/minikube-addons: heapster - addonmanager.kubernetes.io/mode: Reconcile - namespace: kube-system -spec: - replicas: 1 - selector: - k8s-app: influx-grafana - addonmanager.kubernetes.io/mode: Reconcile - template: - metadata: - labels: - k8s-app: influx-grafana - addonmanager.kubernetes.io/mode: Reconcile - spec: - containers: - - name: influxdb - image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-influxdb-{{.Arch}}:v1.3.3 - imagePullPolicy: IfNotPresent - ports: - - name: http - containerPort: 8083 - - name: api - containerPort: 8086 - volumeMounts: - - mountPath: /data - name: influxdb-storage - - name: grafana - image: {{default "k8s.gcr.io" .ImageRepository}}/heapster-grafana-{{.Arch}}:v4.4.3 - imagePullPolicy: IfNotPresent - env: - - name: INFLUXDB_SERVICE_URL - value: http://localhost:8086 - # The following env variables are required to make Grafana accessible via - # the kubernetes api-server proxy. On production clusters, we recommend - # removing these env variables, setup auth for grafana, and expose the grafana - # service using a LoadBalancer or a public IP. - - name: GF_AUTH_BASIC_ENABLED - value: "false" - - name: GF_AUTH_ANONYMOUS_ENABLED - value: "true" - - name: GF_AUTH_ANONYMOUS_ORG_ROLE - value: Admin - - name: GF_SERVER_ROOT_URL - value: / - ports: - - name: ui - containerPort: 3000 - volumeMounts: - - mountPath: /var - name: grafana-storage - volumes: - - name: influxdb-storage - emptyDir: {} - - name: grafana-storage - emptyDir: {} diff --git a/deploy/addons/heapster/influxdb-svc.yaml.tmpl b/deploy/addons/heapster/influxdb-svc.yaml.tmpl deleted file mode 100644 index 701bfee282c5..000000000000 --- a/deploy/addons/heapster/influxdb-svc.yaml.tmpl +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2017 The Kubernetes Authors All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -apiVersion: v1 -kind: Service -metadata: - labels: - kubernetes.io/name: monitoring-influxdb - kubernetes.io/minikube-addons: heapster - addonmanager.kubernetes.io/mode: Reconcile - name: monitoring-influxdb - namespace: kube-system -spec: - ports: - - name: http - port: 8083 - targetPort: 8083 - - name: api - port: 8086 - targetPort: 8086 - selector: - addonmanager.kubernetes.io/mode: Reconcile - k8s-app: influx-grafana diff --git a/pkg/minikube/assets/addons.go b/pkg/minikube/assets/addons.go index f2c73b981316..52b0662cb0ec 100644 --- a/pkg/minikube/assets/addons.go +++ b/pkg/minikube/assets/addons.go @@ -132,38 +132,6 @@ var Addons = map[string]*Addon{ "0640", false), }, false, "storage-provisioner-gluster"), - "heapster": NewAddon([]*BinAsset{ - MustBinAsset( - "deploy/addons/heapster/influx-grafana-rc.yaml.tmpl", - vmpath.GuestAddonsDir, - "influxGrafana-rc.yaml", - "0640", - true), - MustBinAsset( - "deploy/addons/heapster/grafana-svc.yaml.tmpl", - vmpath.GuestAddonsDir, - "grafana-svc.yaml", - "0640", - false), - MustBinAsset( - "deploy/addons/heapster/influxdb-svc.yaml.tmpl", - vmpath.GuestAddonsDir, - "influxdb-svc.yaml", - "0640", - false), - MustBinAsset( - "deploy/addons/heapster/heapster-rc.yaml.tmpl", - vmpath.GuestAddonsDir, - "heapster-rc.yaml", - "0640", - true), - MustBinAsset( - "deploy/addons/heapster/heapster-svc.yaml.tmpl", - vmpath.GuestAddonsDir, - "heapster-svc.yaml", - "0640", - false), - }, false, "heapster"), "efk": NewAddon([]*BinAsset{ MustBinAsset( "deploy/addons/efk/elasticsearch-rc.yaml.tmpl", diff --git a/site/content/en/docs/Reference/Commands/addons.md b/site/content/en/docs/Reference/Commands/addons.md index a5fb310468f3..0434ac8eefb1 100644 --- a/site/content/en/docs/Reference/Commands/addons.md +++ b/site/content/en/docs/Reference/Commands/addons.md @@ -4,7 +4,7 @@ linkTitle: "addons" weight: 1 date: 2019-08-01 description: > - Modifies minikube addons files using subcommands like "minikube addons enable heapster" + Modifies minikube addons files using subcommands like "minikube addons enable dashboard" --- ## Overview diff --git a/site/content/en/docs/Reference/Commands/config.md b/site/content/en/docs/Reference/Commands/config.md index 7dd514c8c113..12f70c52bf8d 100644 --- a/site/content/en/docs/Reference/Commands/config.md +++ b/site/content/en/docs/Reference/Commands/config.md @@ -36,7 +36,6 @@ Configurable fields: * dashboard * addon-manager * default-storageclass - * heapster * efk * ingress * registry diff --git a/site/content/en/docs/Reference/Configuration/minikube.md b/site/content/en/docs/Reference/Configuration/minikube.md index 36abf93156ec..608932fc939c 100644 --- a/site/content/en/docs/Reference/Configuration/minikube.md +++ b/site/content/en/docs/Reference/Configuration/minikube.md @@ -77,7 +77,6 @@ Configurable fields: * dashboard * addon-manager * default-storageclass - * heapster * efk * ingress * registry diff --git a/site/content/en/docs/Tasks/addons.md b/site/content/en/docs/Tasks/addons.md index c454360cbcc0..b3f331163dfd 100644 --- a/site/content/en/docs/Tasks/addons.md +++ b/site/content/en/docs/Tasks/addons.md @@ -11,7 +11,6 @@ minikube has a set of built-in addons that, when enabled, can be used within Kub ## Available addons * [Kubernetes Dashboard](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/dashboard) -* [Heapster](https://github.com/kubernetes/heapster): [Troubleshooting Guide](https://github.com/kubernetes/heapster/blob/master/docs/influxdb.md) Note:You will need to login to Grafana as admin/admin in order to access the console * [EFK](https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch) * [Registry](https://github.com/kubernetes/minikube/tree/master/deploy/addons/registry) * [Registry Credentials](https://github.com/upmc-enterprises/registry-creds) @@ -39,7 +38,6 @@ Example output: - freshpod: disabled - addon-manager: enabled - dashboard: enabled -- heapster: disabled - efk: disabled - ingress: disabled - default-storageclass: enabled