Documentation ¶
Index ¶
- Constants
- func CollectData(cmd *cobra.Command) error
- func ExecuteCommands(shellCmd Shell, ci []Command) (map[string]*Info, error)
- func LoadKubeletMapping(kubletConfigMapping string) (map[string]string, error)
- func SanitizeString(output string, replaceable map[string]string) string
- func StringToArray(output string, delimiter string) []interface{}
- type Cluster
- type Command
- type Config
- type Info
- type Mapper
- type Node
- type NodeParams
- type Params
- type Platform
- type Shell
- type SpecInfo
- type SpecVersion
Constants ¶
View Source
const ( // Version resource version Version = "v1" // Kind resource kind Kind = "NodeInfo" )
View Source
const ( // WorkerNode worker node type WorkerNode = "worker" // MasterNode master Node type MasterNode = "master" )
Variables ¶
This section is empty.
Functions ¶
func CollectData ¶
CollectData run spec audit command and output it result data
func LoadKubeletMapping ¶
func SanitizeString ¶
SanitizeString snitize string from special characters
func StringToArray ¶
StringToArray convert string with delimiter to array
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func GetCluster ¶
func NewCluster ¶
func NewCluster(clientSet *kubernetes.Clientset, clientConfig clientcmd.ClientConfig, restMApper meta.RESTMapper, dynamicClient dynamic.Interface) *Cluster
type Command ¶
type Command struct { Key string `yaml:"key"` Title string `yaml:"title"` Audit string `yaml:"audit"` NodeType string `yaml:"nodeType"` }
Collector details of info to collect
type Config ¶
type Config struct {
Node NodeParams `yaml:"node"`
}
func LoadConfigParams ¶
LoadConfigParams load audit params data
type Mapper ¶
type Mapper struct {
VersionMapping map[string][]SpecVersion `yaml:"version_mapping"`
}
type Node ¶
type Node struct { APIVersion string `json:"apiVersion"` Kind string `json:"kind"` Metadata map[string]string `json:"metadata"` Type string `json:"type"` Info map[string]*Info `json:"info"` }
Node output node data with info results
type NodeParams ¶
type NodeParams struct { APIserver Params `yaml:"apiserver"` ControllerManager Params `yaml:"controllermanager"` Scheduler Params `yaml:"scheduler"` Etcd Params `yaml:"etcd"` Proxy Params `yaml:"proxy"` KubeLet Params `yaml:"kubelet"` Flanneld Params `yaml:"flanneld"` VersionMapping map[string]string `yaml:"version_mapping"` }
type Params ¶
type Params struct { Config []string `yaml:"confs,omitempty"` DefaultConfig string `yaml:"defaultconf,omitempty"` KubeConfig []string `yaml:"kubeconfig,omitempty"` DefaultKubeConfig string `yaml:"defaultkubeconfig,omitempty"` DataDirs []string `yaml:"datadirs,omitempty"` DefaultDataDir string `yaml:"defaultdatadir,omitempty"` Binaries []string `yaml:"bins,omitempty"` DefaultBinaries string `yaml:"defaultbins,omitempty"` Services []string `yaml:"svc,omitempty"` DefalutServices string `yaml:"defaultsvc,omitempty"` CAFile []string `yaml:"cafile,omitempty"` DefaultCAFile string `yaml:"defaultcafile,omitempty"` }
Click to show internal directories.
Click to hide internal directories.