From 52e87306383ce2129aa8d9f3fea70d65695f6ee2 Mon Sep 17 00:00:00 2001 From: pixiake Date: Tue, 26 May 2020 22:25:05 +0800 Subject: [PATCH] Add license info --- cmd/cmd.go | 24 +- cmd/create/cluster.go | 16 + cmd/create/config.go | 16 + cmd/create/create.go | 16 + cmd/create/etcd.go | 16 + cmd/delete.go | 16 + cmd/kubesphere/apply.go | 1 - cmd/kubesphere/create.go | 1 - cmd/scale.go | 16 + cmd/version.go | 16 + kubekey.go | 18 +- pkg/apis/kubekey/v1alpha1/cluster_types.go | 16 + pkg/apis/kubekey/v1alpha1/default.go | 16 + pkg/apis/kubekey/v1alpha1/plugins_types.go | 16 + pkg/cluster/etcd/etcd.go | 16 + pkg/cluster/etcd/tmpl/certs.go | 16 + pkg/cluster/etcd/tmpl/etcd.go | 16 + pkg/cluster/kubernetes/master.go | 16 + pkg/cluster/kubernetes/nodes.go | 16 + pkg/cluster/kubernetes/tmpl/kubeadm.go | 16 + pkg/cluster/kubernetes/tmpl/kubelet.go | 16 + pkg/cluster/preinstall/initOS.go | 16 + pkg/cluster/preinstall/preinstall.go | 16 + pkg/cluster/preinstall/tmpl/InitOS.go | 16 + pkg/config/config.go | 16 + pkg/config/default.go | 16 + pkg/container-engine/docker/docker.go | 16 + pkg/controller/add_cluster.go | 16 + pkg/controller/cluster/cluster_controller.go | 16 + pkg/controller/controller.go | 16 + pkg/delete/delete.go | 16 + pkg/files/file.go | 16 + pkg/images/default.go | 16 + pkg/images/images.go | 16 + pkg/install/install.go | 16 + pkg/kubesphere/kubesphere.go | 16 + pkg/kubesphere/tmpl.go | 16 + pkg/plugins/dns/coredns.go | 16 + pkg/plugins/dns/dns.go | 16 + pkg/plugins/dns/nodelocaldns.go | 16 + pkg/plugins/network/calico/tmpl.go | 16 + pkg/plugins/network/flannel/tmpl.go | 16 + pkg/plugins/network/network.go | 16 + pkg/plugins/storage/ceph-rbd/ceph-rbd.go | 16 + pkg/plugins/storage/glusterfs/glusterfs.go | 16 + pkg/plugins/storage/local-volume/openebs.go | 16 + pkg/plugins/storage/local-volume/openebs.yaml | 327 ------------------ pkg/plugins/storage/nfs-client/nfs-client.go | 16 + pkg/plugins/storage/storage.go | 16 + pkg/scale/executor.go | 16 + pkg/scale/scale.go | 32 +- pkg/util/executor/executor.go | 16 + pkg/util/manager/manager.go | 36 +- pkg/util/manager/task-control.go | 16 + pkg/util/manager/task-run.go | 16 + pkg/util/runner/runner.go | 16 + pkg/util/ssh/dialer.go | 16 + pkg/util/ssh/sftp.go | 16 + pkg/util/ssh/ssh.go | 16 + pkg/util/util.go | 16 + version/version.go | 5 - 61 files changed, 920 insertions(+), 372 deletions(-) delete mode 100644 cmd/kubesphere/apply.go delete mode 100644 cmd/kubesphere/create.go delete mode 100644 pkg/plugins/storage/local-volume/openebs.yaml delete mode 100644 version/version.go diff --git a/cmd/cmd.go b/cmd/cmd.go index e41d1cff..ab8b9e51 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package cmd import ( @@ -11,10 +27,10 @@ func NewKubekeyCommand() *cobra.Command { var rootCmd = &cobra.Command{ Use: "kk", Short: "Kubernetes/KubeSphere Deploy Tool", - Long: "Deploy a Kubernetes or KubeSphere cluster efficiently, flexibly and easily. There are three scenarios to use KubeKey. \n" + - "1. Install Kubernetes only \n" + - "2. Install Kubernetes and KubeSphere together in one command \n" + - "3. Install Kubernetes first, then deploy KubeSphere on it using https://github.com/kubesphere/ks-installer", + Long: "Deploy a Kubernetes or KubeSphere cluster efficiently, flexibly and easily. There are three scenarios to use KubeKey. \n" + + "1. Install Kubernetes only \n" + + "2. Install Kubernetes and KubeSphere together in one command \n" + + "3. Install Kubernetes first, then deploy KubeSphere on it using https://github.com/kubesphere/ks-installer", } rootCmd.AddCommand(create.NewCmdCreate()) diff --git a/cmd/create/cluster.go b/cmd/create/cluster.go index bb62fb9d..b77c44ae 100644 --- a/cmd/create/cluster.go +++ b/cmd/create/cluster.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package create import ( diff --git a/cmd/create/config.go b/cmd/create/config.go index 9e043410..806e7df1 100644 --- a/cmd/create/config.go +++ b/cmd/create/config.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package create import ( diff --git a/cmd/create/create.go b/cmd/create/create.go index 21c559c4..83dc44ba 100644 --- a/cmd/create/create.go +++ b/cmd/create/create.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package create import ( diff --git a/cmd/create/etcd.go b/cmd/create/etcd.go index 97c9127f..69f5368e 100644 --- a/cmd/create/etcd.go +++ b/cmd/create/etcd.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package create import ( diff --git a/cmd/delete.go b/cmd/delete.go index 6af4114f..233923de 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package cmd import ( diff --git a/cmd/kubesphere/apply.go b/cmd/kubesphere/apply.go deleted file mode 100644 index 3d8743f5..00000000 --- a/cmd/kubesphere/apply.go +++ /dev/null @@ -1 +0,0 @@ -package kubesphere diff --git a/cmd/kubesphere/create.go b/cmd/kubesphere/create.go deleted file mode 100644 index 3d8743f5..00000000 --- a/cmd/kubesphere/create.go +++ /dev/null @@ -1 +0,0 @@ -package kubesphere diff --git a/cmd/scale.go b/cmd/scale.go index e89ef5b5..930fa1ba 100644 --- a/cmd/scale.go +++ b/cmd/scale.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package cmd import ( diff --git a/cmd/version.go b/cmd/version.go index 01a30a9d..8a915719 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package cmd import ( diff --git a/kubekey.go b/kubekey.go index 994834ed..bed4a3e7 100644 --- a/kubekey.go +++ b/kubekey.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package main import ( @@ -10,8 +26,6 @@ func main() { pflag.CommandLine.AddGoFlagSet(flag.CommandLine) pflag.Set("logtostderr", "true") - // We do not want these flags to show up in --help - // These MarkHidden calls must be after the lines above pflag.CommandLine.MarkHidden("version") pflag.CommandLine.MarkHidden("log-flush-frequency") pflag.CommandLine.MarkHidden("alsologtostderr") diff --git a/pkg/apis/kubekey/v1alpha1/cluster_types.go b/pkg/apis/kubekey/v1alpha1/cluster_types.go index 5ba4e3b3..8ec7ea93 100644 --- a/pkg/apis/kubekey/v1alpha1/cluster_types.go +++ b/pkg/apis/kubekey/v1alpha1/cluster_types.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package v1alpha1 import ( diff --git a/pkg/apis/kubekey/v1alpha1/default.go b/pkg/apis/kubekey/v1alpha1/default.go index f0432cb5..35c7878f 100644 --- a/pkg/apis/kubekey/v1alpha1/default.go +++ b/pkg/apis/kubekey/v1alpha1/default.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package v1alpha1 import ( diff --git a/pkg/apis/kubekey/v1alpha1/plugins_types.go b/pkg/apis/kubekey/v1alpha1/plugins_types.go index 3ce8b851..64096d37 100644 --- a/pkg/apis/kubekey/v1alpha1/plugins_types.go +++ b/pkg/apis/kubekey/v1alpha1/plugins_types.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package v1alpha1 type Storage struct { diff --git a/pkg/cluster/etcd/etcd.go b/pkg/cluster/etcd/etcd.go index ff269fdb..9b1736b8 100644 --- a/pkg/cluster/etcd/etcd.go +++ b/pkg/cluster/etcd/etcd.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package etcd import ( diff --git a/pkg/cluster/etcd/tmpl/certs.go b/pkg/cluster/etcd/tmpl/certs.go index aae59126..57389b3c 100644 --- a/pkg/cluster/etcd/tmpl/certs.go +++ b/pkg/cluster/etcd/tmpl/certs.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package tmpl import ( diff --git a/pkg/cluster/etcd/tmpl/etcd.go b/pkg/cluster/etcd/tmpl/etcd.go index a6ac17cf..5ebd57ea 100644 --- a/pkg/cluster/etcd/tmpl/etcd.go +++ b/pkg/cluster/etcd/tmpl/etcd.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package tmpl import ( diff --git a/pkg/cluster/kubernetes/master.go b/pkg/cluster/kubernetes/master.go index c8b715c9..9cc38b8c 100644 --- a/pkg/cluster/kubernetes/master.go +++ b/pkg/cluster/kubernetes/master.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package kubernetes import ( diff --git a/pkg/cluster/kubernetes/nodes.go b/pkg/cluster/kubernetes/nodes.go index 430d7667..b0339351 100644 --- a/pkg/cluster/kubernetes/nodes.go +++ b/pkg/cluster/kubernetes/nodes.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package kubernetes import ( diff --git a/pkg/cluster/kubernetes/tmpl/kubeadm.go b/pkg/cluster/kubernetes/tmpl/kubeadm.go index 894ba021..4d89c15c 100644 --- a/pkg/cluster/kubernetes/tmpl/kubeadm.go +++ b/pkg/cluster/kubernetes/tmpl/kubeadm.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package tmpl import ( diff --git a/pkg/cluster/kubernetes/tmpl/kubelet.go b/pkg/cluster/kubernetes/tmpl/kubelet.go index cf43356f..07892500 100644 --- a/pkg/cluster/kubernetes/tmpl/kubelet.go +++ b/pkg/cluster/kubernetes/tmpl/kubelet.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package tmpl import ( diff --git a/pkg/cluster/preinstall/initOS.go b/pkg/cluster/preinstall/initOS.go index 30da1bba..c20271b4 100644 --- a/pkg/cluster/preinstall/initOS.go +++ b/pkg/cluster/preinstall/initOS.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package preinstall import ( diff --git a/pkg/cluster/preinstall/preinstall.go b/pkg/cluster/preinstall/preinstall.go index 649b5cf1..382e48e8 100644 --- a/pkg/cluster/preinstall/preinstall.go +++ b/pkg/cluster/preinstall/preinstall.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package preinstall import ( diff --git a/pkg/cluster/preinstall/tmpl/InitOS.go b/pkg/cluster/preinstall/tmpl/InitOS.go index 45622996..135fc957 100644 --- a/pkg/cluster/preinstall/tmpl/InitOS.go +++ b/pkg/cluster/preinstall/tmpl/InitOS.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package tmpl import ( diff --git a/pkg/config/config.go b/pkg/config/config.go index c412f051..172a4140 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package config import ( diff --git a/pkg/config/default.go b/pkg/config/default.go index 8aea24b8..d8e20032 100644 --- a/pkg/config/default.go +++ b/pkg/config/default.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package config import ( diff --git a/pkg/container-engine/docker/docker.go b/pkg/container-engine/docker/docker.go index 1dd3257e..98cc5da0 100644 --- a/pkg/container-engine/docker/docker.go +++ b/pkg/container-engine/docker/docker.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package docker import ( diff --git a/pkg/controller/add_cluster.go b/pkg/controller/add_cluster.go index f1f2af23..ec6a86b4 100644 --- a/pkg/controller/add_cluster.go +++ b/pkg/controller/add_cluster.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package controller import ( diff --git a/pkg/controller/cluster/cluster_controller.go b/pkg/controller/cluster/cluster_controller.go index ee153bd1..03715d36 100644 --- a/pkg/controller/cluster/cluster_controller.go +++ b/pkg/controller/cluster/cluster_controller.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package cluster import ( diff --git a/pkg/controller/controller.go b/pkg/controller/controller.go index 7c069f3e..ec7ca35b 100644 --- a/pkg/controller/controller.go +++ b/pkg/controller/controller.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package controller import ( diff --git a/pkg/delete/delete.go b/pkg/delete/delete.go index 827145a3..ae7c5d1a 100644 --- a/pkg/delete/delete.go +++ b/pkg/delete/delete.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package delete import ( diff --git a/pkg/files/file.go b/pkg/files/file.go index 09184b85..f1bb7f85 100644 --- a/pkg/files/file.go +++ b/pkg/files/file.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package files const ( diff --git a/pkg/images/default.go b/pkg/images/default.go index 2e3ec7dc..d122f7b5 100644 --- a/pkg/images/default.go +++ b/pkg/images/default.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package images import ( diff --git a/pkg/images/images.go b/pkg/images/images.go index 578e4136..3d02f0bf 100644 --- a/pkg/images/images.go +++ b/pkg/images/images.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package images import ( diff --git a/pkg/install/install.go b/pkg/install/install.go index f44b605d..dae471d4 100644 --- a/pkg/install/install.go +++ b/pkg/install/install.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package install import ( diff --git a/pkg/kubesphere/kubesphere.go b/pkg/kubesphere/kubesphere.go index 10114e0f..0cf39999 100644 --- a/pkg/kubesphere/kubesphere.go +++ b/pkg/kubesphere/kubesphere.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package kubesphere import ( diff --git a/pkg/kubesphere/tmpl.go b/pkg/kubesphere/tmpl.go index 9a4e6a82..c490664e 100644 --- a/pkg/kubesphere/tmpl.go +++ b/pkg/kubesphere/tmpl.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package kubesphere import ( diff --git a/pkg/plugins/dns/coredns.go b/pkg/plugins/dns/coredns.go index 1cea5ad9..c33175d1 100644 --- a/pkg/plugins/dns/coredns.go +++ b/pkg/plugins/dns/coredns.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package dns import ( diff --git a/pkg/plugins/dns/dns.go b/pkg/plugins/dns/dns.go index 5090eb66..488d5510 100644 --- a/pkg/plugins/dns/dns.go +++ b/pkg/plugins/dns/dns.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package dns import ( diff --git a/pkg/plugins/dns/nodelocaldns.go b/pkg/plugins/dns/nodelocaldns.go index 1f4103d6..56e4626c 100644 --- a/pkg/plugins/dns/nodelocaldns.go +++ b/pkg/plugins/dns/nodelocaldns.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package dns import ( diff --git a/pkg/plugins/network/calico/tmpl.go b/pkg/plugins/network/calico/tmpl.go index 81daa75b..aab310dd 100644 --- a/pkg/plugins/network/calico/tmpl.go +++ b/pkg/plugins/network/calico/tmpl.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package calico import ( diff --git a/pkg/plugins/network/flannel/tmpl.go b/pkg/plugins/network/flannel/tmpl.go index 4c9ad2fa..dc61c607 100644 --- a/pkg/plugins/network/flannel/tmpl.go +++ b/pkg/plugins/network/flannel/tmpl.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package flannel import ( diff --git a/pkg/plugins/network/network.go b/pkg/plugins/network/network.go index 5a2b2e76..b455784c 100644 --- a/pkg/plugins/network/network.go +++ b/pkg/plugins/network/network.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package network import ( diff --git a/pkg/plugins/storage/ceph-rbd/ceph-rbd.go b/pkg/plugins/storage/ceph-rbd/ceph-rbd.go index e55cba2c..9746b289 100644 --- a/pkg/plugins/storage/ceph-rbd/ceph-rbd.go +++ b/pkg/plugins/storage/ceph-rbd/ceph-rbd.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package ceph_rbd import ( diff --git a/pkg/plugins/storage/glusterfs/glusterfs.go b/pkg/plugins/storage/glusterfs/glusterfs.go index c3a3579f..645a047a 100644 --- a/pkg/plugins/storage/glusterfs/glusterfs.go +++ b/pkg/plugins/storage/glusterfs/glusterfs.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package glusterfs import ( diff --git a/pkg/plugins/storage/local-volume/openebs.go b/pkg/plugins/storage/local-volume/openebs.go index 68c7484f..dfaa6f59 100644 --- a/pkg/plugins/storage/local-volume/openebs.go +++ b/pkg/plugins/storage/local-volume/openebs.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package local_volume import ( diff --git a/pkg/plugins/storage/local-volume/openebs.yaml b/pkg/plugins/storage/local-volume/openebs.yaml deleted file mode 100644 index 34f8de35..00000000 --- a/pkg/plugins/storage/local-volume/openebs.yaml +++ /dev/null @@ -1,327 +0,0 @@ ---- -#Sample storage classes for OpenEBS Local PV -apiVersion: storage.k8s.io/v1 -kind: StorageClass -metadata: - name: local - annotations: - storageclass.kubesphere.io/supported_access_modes: '["ReadWriteOnce"]' - storageclass.beta.kubernetes.io/is-default-class: "true" - openebs.io/cas-type: local - cas.openebs.io/config: | - - name: StorageType - value: "hostpath" - - name: BasePath - value: "/var/openebs/local/" -provisioner: openebs.io/local -volumeBindingMode: WaitForFirstConsumer -reclaimPolicy: Delete ---- -# Create Maya Service Account -apiVersion: v1 -kind: ServiceAccount -metadata: - name: openebs-maya-operator - namespace: kube-system ---- -# Define Role that allows operations on K8s pods/deployments -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: openebs-maya-operator -rules: - - apiGroups: ["*"] - resources: ["nodes", "nodes/proxy"] - verbs: ["*"] - - apiGroups: ["*"] - resources: ["namespaces", "services", "pods", "deployments", "events", "endpoints", "configmaps", "jobs"] - verbs: ["*"] - - apiGroups: ["*"] - resources: ["storageclasses", "persistentvolumeclaims", "persistentvolumes"] - verbs: ["*"] - - apiGroups: ["volumesnapshot.external-storage.k8s.io"] - resources: ["volumesnapshots", "volumesnapshotdatas"] - verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - - apiGroups: ["apiextensions.k8s.io"] - resources: ["customresourcedefinitions"] - verbs: [ "get", "list", "create", "update", "delete", "patch"] - - apiGroups: ["*"] - resources: [ "disks", "blockdevices", "blockdeviceclaims"] - verbs: ["*" ] - - apiGroups: ["*"] - resources: [ "cstorpoolclusters", "storagepoolclaims", "storagepoolclaims/finalizers", "storagepools"] - verbs: ["*" ] - - apiGroups: ["*"] - resources: [ "castemplates", "runtasks"] - verbs: ["*" ] - - apiGroups: ["*"] - resources: [ "cstorpools", "cstorpools/finalizers", "cstorvolumereplicas", "cstorvolumes", "cstorvolumeclaims"] - verbs: ["*" ] - - apiGroups: ["*"] - resources: [ "cstorbackups", "cstorrestores", "cstorcompletedbackups"] - verbs: ["*" ] - - nonResourceURLs: ["/metrics"] - verbs: ["get"] - - apiGroups: ["*"] - resources: [ "upgradetasks"] - verbs: ["*" ] ---- -# Bind the Service Account with the Role Privileges. -# TODO: Check if default account also needs to be there -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1beta1 -metadata: - name: openebs-maya-operator -subjects: - - kind: ServiceAccount - name: openebs-maya-operator - namespace: kube-system - - kind: User - name: system:serviceaccount:default:default - apiGroup: rbac.authorization.k8s.io -roleRef: - kind: ClusterRole - name: openebs-maya-operator - apiGroup: rbac.authorization.k8s.io ---- -# This is the node-disk-manager related config. -# It can be used to customize the disks probes and filters -apiVersion: v1 -kind: ConfigMap -metadata: - name: openebs-ndm-config - namespace: kube-system - labels: - openebs.io/component-name: ndm-config -data: - # udev-probe is default or primary probe which should be enabled to run ndm - # filterconfigs contails configs of filters - in their form fo include - # and exclude comma separated strings - node-disk-manager.config: | - probeconfigs: - - key: udev-probe - name: udev probe - state: true - - key: seachest-probe - name: seachest probe - state: false - - key: smart-probe - name: smart probe - state: true - filterconfigs: - - key: os-disk-exclude-filter - name: os disk exclude filter - state: true - exclude: "/,/etc/hosts,/boot" - - key: vendor-filter - name: vendor filter - state: true - include: "" - exclude: "CLOUDBYT,OpenEBS" - - key: path-filter - name: path filter - state: true - include: "" - exclude: "loop,/dev/fd0,/dev/sr0,/dev/ram,/dev/dm-,/dev/md" ---- -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: openebs-ndm - namespace: kube-system - labels: - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 1.1.0 -spec: - selector: - matchLabels: - name: openebs-ndm - openebs.io/component-name: ndm - updateStrategy: - type: RollingUpdate - template: - metadata: - labels: - name: openebs-ndm - openebs.io/component-name: ndm - openebs.io/version: 1.1.0 - spec: - # By default the node-disk-manager will be run on all kubernetes nodes - # If you would like to limit this to only some nodes, say the nodes - # that have storage attached, you could label those node and use - # nodeSelector. - # - # e.g. label the storage nodes with - "openebs.io/nodegroup"="storage-node" - # kubectl label node "openebs.io/nodegroup"="storage-node" - #nodeSelector: - # "openebs.io/nodegroup": "storage-node" - serviceAccountName: openebs-maya-operator - hostNetwork: true - containers: - - name: node-disk-manager - image: kubesphere/node-disk-manager-amd64:v0.4.1 - imagePullPolicy: IfNotPresent - securityContext: - privileged: true - volumeMounts: - - name: config - mountPath: /host/node-disk-manager.config - subPath: node-disk-manager.config - readOnly: true - - name: udev - mountPath: /run/udev - - name: procmount - mountPath: /host/proc - readOnly: true - - name: sparsepath - mountPath: /var/openebs/sparse - env: - # namespace in which NDM is installed will be passed to NDM Daemonset - # as environment variable - - name: NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - # pass hostname as env variable using downward API to the NDM container - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - # specify the directory where the sparse files need to be created. - # if not specified, then sparse files will not be created. - - name: SPARSE_FILE_DIR - value: "/var/openebs/sparse" - # Size(bytes) of the sparse file to be created. - - name: SPARSE_FILE_SIZE - value: "10737418240" - # Specify the number of sparse files to be created - - name: SPARSE_FILE_COUNT - value: "1" - livenessProbe: - exec: - command: - - pgrep - - ".*ndm" - initialDelaySeconds: 30 - periodSeconds: 60 - volumes: - - name: config - configMap: - name: openebs-ndm-config - - name: udev - hostPath: - path: /run/udev - type: Directory - # mount /proc (to access mount file of process 1 of host) inside container - # to read mount-point of disks and partitions - - name: procmount - hostPath: - path: /proc - type: Directory - - name: sparsepath - hostPath: - path: /var/openebs/sparse ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: openebs-ndm-operator - namespace: kube-system - labels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 1.1.0 -spec: - selector: - matchLabels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - name: openebs-ndm-operator - openebs.io/component-name: ndm-operator - openebs.io/version: 1.1.0 - spec: - serviceAccountName: openebs-maya-operator - containers: - - name: node-disk-operator - image: kubesphere/node-disk-operator-amd64:v0.4.1 - imagePullPolicy: IfNotPresent - readinessProbe: - exec: - command: - - stat - - /tmp/operator-sdk-ready - initialDelaySeconds: 4 - periodSeconds: 10 - failureThreshold: 1 - env: - - name: WATCH_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: POD_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: OPERATOR_NAME - value: "node-disk-operator" - - name: CLEANUP_JOB_IMAGE - value: kubesphere/linux-utils:3.9 ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: openebs-localpv-provisioner - namespace: kube-system - labels: - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - openebs.io/version: 1.1.0 -spec: - selector: - matchLabels: - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - replicas: 1 - strategy: - type: Recreate - template: - metadata: - labels: - name: openebs-localpv-provisioner - openebs.io/component-name: openebs-localpv-provisioner - openebs.io/version: 1.1.0 - spec: - serviceAccountName: openebs-maya-operator - containers: - - name: openebs-localpv-provisioner - imagePullPolicy: IfNotPresent - image: kubesphere/provisioner-localpv:1.1.0 - env: - - name: NODE_NAME - valueFrom: - fieldRef: - fieldPath: spec.nodeName - - name: OPENEBS_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: OPENEBS_IO_ENABLE_ANALYTICS - value: "true" - - name: OPENEBS_IO_HELPER_IMAGE - value: kubesphere/openebs-tools:3.8 - - name: OPENEBS_IO_INSTALLER_TYPE - value: "openebs-operator-lite" - livenessProbe: - exec: - command: - - pgrep - - ".*localpv" - initialDelaySeconds: 30 - periodSeconds: 60 \ No newline at end of file diff --git a/pkg/plugins/storage/nfs-client/nfs-client.go b/pkg/plugins/storage/nfs-client/nfs-client.go index 68c1c2ac..40781afa 100644 --- a/pkg/plugins/storage/nfs-client/nfs-client.go +++ b/pkg/plugins/storage/nfs-client/nfs-client.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package nfs_client import ( diff --git a/pkg/plugins/storage/storage.go b/pkg/plugins/storage/storage.go index 83ca02fc..a6b0893f 100644 --- a/pkg/plugins/storage/storage.go +++ b/pkg/plugins/storage/storage.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package storage import ( diff --git a/pkg/scale/executor.go b/pkg/scale/executor.go index c866eb58..a5c0b4fc 100644 --- a/pkg/scale/executor.go +++ b/pkg/scale/executor.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package scale import ( diff --git a/pkg/scale/scale.go b/pkg/scale/scale.go index 6ffc1550..2a0fd4dc 100644 --- a/pkg/scale/scale.go +++ b/pkg/scale/scale.go @@ -1,30 +1,30 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package scale import ( "fmt" "github.com/kubesphere/kubekey/pkg/cluster/kubernetes" "github.com/kubesphere/kubekey/pkg/cluster/preinstall" - "github.com/kubesphere/kubekey/pkg/config" "github.com/kubesphere/kubekey/pkg/container-engine/docker" "github.com/kubesphere/kubekey/pkg/util/manager" "github.com/pkg/errors" - log "github.com/sirupsen/logrus" ) -func ScaleCluster(clusterCfgFile string, logger *log.Logger, pkg string, verbose bool) error { - cfg, err := config.ParseClusterCfg(clusterCfgFile, "", logger) - if err != nil { - return errors.Wrap(err, "Failed to download cluster config") - } - - //output, _ := json.MarshalIndent(cfg, "", " ") - //fmt.Println(string(output)) - if err := preinstall.Prepare(&cfg.Spec, logger); err != nil { - return errors.Wrap(err, "Failed to load kube binarys") - } - return NewExecutor(&cfg.Spec, logger, verbose).Execute() -} - func ExecTasks(mgr *manager.Manager) error { scaleTasks := []manager.Task{ {Task: preinstall.InitOS, ErrMsg: "Failed to download kube binaries"}, diff --git a/pkg/util/executor/executor.go b/pkg/util/executor/executor.go index f0428a4b..588fab19 100644 --- a/pkg/util/executor/executor.go +++ b/pkg/util/executor/executor.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package executor import ( diff --git a/pkg/util/manager/manager.go b/pkg/util/manager/manager.go index e4c3a5ae..851c4058 100644 --- a/pkg/util/manager/manager.go +++ b/pkg/util/manager/manager.go @@ -1,21 +1,32 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package manager import ( - ssh2 "github.com/kubesphere/kubekey/pkg/util/ssh" - "github.com/sirupsen/logrus" - kubekeyapi "github.com/kubesphere/kubekey/pkg/apis/kubekey/v1alpha1" - "github.com/kubesphere/kubekey/pkg/util/runner" - //"k8s.io/client-go/rest" - //bootstraputil "k8s.io/cluster-bootstrap/token/util" - //dynclient "sigs.k8s.io/manager-runtime/pkg/client" + "github.com/kubesphere/kubekey/pkg/util/ssh" + log "github.com/sirupsen/logrus" ) type Manager struct { Cluster *kubekeyapi.ClusterSpec - Logger logrus.FieldLogger - Connector *ssh2.Dialer + Logger log.FieldLogger + Connector *ssh.Dialer Runner *runner.Runner AllNodes []kubekeyapi.HostCfg EtcdNodes []kubekeyapi.HostCfg @@ -30,13 +41,6 @@ type Manager struct { Verbose bool } -func (mgr *Manager) KubeadmVerboseFlag() string { - if mgr.Verbose { - return "--v=6" - } - return "" -} - func (mgr *Manager) Clone() *Manager { newManager := *mgr return &newManager diff --git a/pkg/util/manager/task-control.go b/pkg/util/manager/task-control.go index 688168ae..cefcfff2 100644 --- a/pkg/util/manager/task-control.go +++ b/pkg/util/manager/task-control.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package manager import ( diff --git a/pkg/util/manager/task-run.go b/pkg/util/manager/task-run.go index c6a5b399..07e01173 100644 --- a/pkg/util/manager/task-run.go +++ b/pkg/util/manager/task-run.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package manager import ( diff --git a/pkg/util/runner/runner.go b/pkg/util/runner/runner.go index c20e4db9..8c611143 100644 --- a/pkg/util/runner/runner.go +++ b/pkg/util/runner/runner.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package runner import ( diff --git a/pkg/util/ssh/dialer.go b/pkg/util/ssh/dialer.go index 13967b5b..e6ae2fbe 100644 --- a/pkg/util/ssh/dialer.go +++ b/pkg/util/ssh/dialer.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package ssh import ( diff --git a/pkg/util/ssh/sftp.go b/pkg/util/ssh/sftp.go index 17c91d79..4c50c049 100644 --- a/pkg/util/ssh/sftp.go +++ b/pkg/util/ssh/sftp.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package ssh import ( diff --git a/pkg/util/ssh/ssh.go b/pkg/util/ssh/ssh.go index f24477e0..4e8cf00b 100644 --- a/pkg/util/ssh/ssh.go +++ b/pkg/util/ssh/ssh.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package ssh import ( diff --git a/pkg/util/util.go b/pkg/util/util.go index 59acec76..b2977add 100644 --- a/pkg/util/util.go +++ b/pkg/util/util.go @@ -1,3 +1,19 @@ +/* +Copyright 2020 The KubeSphere Authors. + +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. +*/ + package util import ( diff --git a/version/version.go b/version/version.go deleted file mode 100644 index e3e130bf..00000000 --- a/version/version.go +++ /dev/null @@ -1,5 +0,0 @@ -package version - -var ( - Version = "0.0.1" -)