Documentation ¶
Overview ¶
* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
* Tencent is pleased to support the open source community by making TKEStack * available. * * Copyright (C) 2012-2019 Tencent. 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 * * https://opensource.org/licenses/Apache-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 OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // UnKnowTypeErr will be returned if target node executor is not found UnKnowTypeErr = fmt.Errorf("unknow node executor type") // NoneExecutor will be returned if node executor type is "none" NoneExecutor = fmt.Errorf("none executor") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Type is the node executor type Type string // Namespace is the namespace to install node agent if node executor type is "agent" Namespace string // DaemonSet is the DaemonSet name if node executor type is "agent" DaemonSet string // Image is the image that will be use to create node agent DaemonSet Image string // AutoCreate indicate whether to create node agent DaemonSet if it is not exist // if AutoCreate is true, agent will be deleted once cluster diagnostic done AutoCreate bool }
Config is the config of node executor
type DaemonSetProxy ¶
type DaemonSetProxy struct {
// contains filtered or unexported fields
}
DaemonSetProxy will create a DaemonSet to do cmd on node
func NewDaemonSetProxy ¶
func NewDaemonSetProxy(logger logger.Logger, cli kubernetes.Interface, config *restclient.Config, namespace string, ds string, image string, autoCreate bool) (*DaemonSetProxy, error)
NewDaemonSetProxy create and init a new DaemonSetProxy
func (*DaemonSetProxy) DoCmd ¶
func (d *DaemonSetProxy) DoCmd(nodeName string, cmd []string) (stdout string, stderr string, err error)
DoCmd executes command on target node
func (*DaemonSetProxy) Finish ¶
func (d *DaemonSetProxy) Finish() error
Finish do clean for ComponentExecutor