Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlagsToSSH(ssh *sshutils.SSH, flags *pflag.FlagSet)
- func Omitempty(data []byte) ([]byte, error)
- type AgentRegions
- type Agents
- type CliOptions
- type DeployConfig
- func (c *DeployConfig) AddFlags(flags *pflag.FlagSet)
- func (c *DeployConfig) Complete() error
- func (c *DeployConfig) GetKcAgentConfigTemplateContent(metadata Metadata) (string, error)
- func (c *DeployConfig) GetKcServerConfigTemplateContent(ip string) (string, error)
- func (c *DeployConfig) MergeDeployOptions()
- func (c *DeployConfig) Write() error
- type Etcd
- type FIPs
- type IOStreams
- type ImageProxy
- type MQ
- type Metadata
- type OpLog
Constants ¶
View Source
const ( DefaultPath = ".kc" DefaultDeployConfig = "deploy-config.yaml" DefaultConfig = "config" DefaultCaPath = "pki" DefaultEtcdPKIPath = "pki/etcd" DefaultNatsPKIPath = "pki/nats" DefaultKcServerConfigPath = "/etc/kubeclipper-server" DefaultKcAgentConfigPath = "/etc/kubeclipper-agent" DefaultRegion = "default" // EtcdCa = "etcd-ca" //ca Ca = "ca" EtcdPeer = "etcd-peer" // peer EtcdServer = "etcd" // server EtcdKcClient = "kc-server-etcd-client" EtcdHealthCheck = "kube-etcd-healthcheck-client" // healthcheck-client NatsIOClient = "kc-server-nats-client" NatsIOServer = "kc-server-nats-server" NatsAltNameProxy = "proxy.kubeclipper.io" // add nats server SAN for agent proxy )
View Source
const ( ResourceNode = "node" ResourceCluster = "cluster" ResourceUser = "user" ResourceRole = "role" ResourceConfigMap = "configmap" UpgradeKcctl = "kcctl" UpgradeAgent = "agent" UpgradeServer = "server" UpgradeConsole = "console" UpgradeAll = "all" )
View Source
const (
Contact = `` /* 419-byte string literal not displayed */
)
View Source
const IPDetectDescription = `` /* 1705-byte string literal not displayed */
Variables ¶
View Source
var ( DefaultDeployConfigPath = filepath.Join(HomeDIR, DefaultPath, DefaultDeployConfig) DefaultConfigPath = filepath.Join(HomeDIR, DefaultPath, DefaultConfig) )
View Source
var AssumeYes bool
View Source
var (
HomeDIR = homedir.HomeDir()
)
Functions ¶
Types ¶
type AgentRegions ¶ added in v1.2.0
func (AgentRegions) Add ¶ added in v1.2.0
func (a AgentRegions) Add(region, ip string)
func (AgentRegions) Delete ¶ added in v1.2.0
func (a AgentRegions) Delete(ip string)
func (AgentRegions) Exists ¶ added in v1.2.0
func (a AgentRegions) Exists(ip string) bool
func (AgentRegions) ListIP ¶ added in v1.2.0
func (a AgentRegions) ListIP() []string
type Agents ¶
func (Agents) ExistsByID ¶ added in v1.3.1
type CliOptions ¶
type CliOptions struct { Config string // contains filtered or unexported fields }
func NewCliOptions ¶
func NewCliOptions() *CliOptions
func (*CliOptions) AddFlags ¶
func (c *CliOptions) AddFlags(flags *pflag.FlagSet)
func (*CliOptions) Complete ¶
func (c *CliOptions) Complete() error
func (*CliOptions) ToRawConfig ¶
func (c *CliOptions) ToRawConfig() config.Config
type DeployConfig ¶
type DeployConfig struct { Config string `json:"-" yaml:"-"` SSHConfig *sshutils.SSH `json:"ssh" yaml:"ssh,omitempty"` EtcdConfig *Etcd `json:"etcd" yaml:"etcd,omitempty"` ServerIPs []string `json:"serverIPs" yaml:"serverIPs,omitempty"` Agents Agents `json:"agents" yaml:"agents,omitempty"` Proxys []string `json:"proxys" yaml:"proxys,omitempty"` IPDetect string `json:"ipDetect" yaml:"ipDetect,omitempty"` Debug bool `json:"debug" yaml:"debug,omitempty"` DefaultRegion string `json:"defaultRegion" yaml:"defaultRegion,omitempty"` ServerPort int `json:"serverPort" yaml:"serverPort,omitempty"` StaticServerPort int `json:"staticServerPort" yaml:"staticServerPort,omitempty"` StaticServerPath string `json:"staticServerPath" yaml:"staticServerPath,omitempty"` Pkg string `json:"pkg" yaml:"pkg,omitempty"` ConsolePort int `json:"consolePort" yaml:"consolePort,omitempty"` JWTSecret string `json:"jwtSecret" yaml:"jwtSecret,omitempty"` AuditOpts *option.AuditOptions `json:"audit" yaml:"audit,omitempty"` MQ *MQ `json:"mq" yaml:"mq,omitempty"` OpLog *OpLog `json:"opLog" yaml:"opLog,omitempty"` ImageProxy *ImageProxy `json:"imageProxy" yaml:"imageProxy,omitempty"` AuthenticationOpts *options.AuthenticationOptions `json:"authentication" yaml:"authentication,omitempty"` }
func NewDeployOptions ¶
func NewDeployOptions() *DeployConfig
func (*DeployConfig) AddFlags ¶
func (c *DeployConfig) AddFlags(flags *pflag.FlagSet)
func (*DeployConfig) Complete ¶
func (c *DeployConfig) Complete() error
func (*DeployConfig) GetKcAgentConfigTemplateContent ¶ added in v1.2.0
func (c *DeployConfig) GetKcAgentConfigTemplateContent(metadata Metadata) (string, error)
func (*DeployConfig) GetKcServerConfigTemplateContent ¶ added in v1.2.0
func (c *DeployConfig) GetKcServerConfigTemplateContent(ip string) (string, error)
func (*DeployConfig) MergeDeployOptions ¶
func (c *DeployConfig) MergeDeployOptions()
func (*DeployConfig) Write ¶
func (c *DeployConfig) Write() error
type ImageProxy ¶
type ImageProxy struct {
KcImageRepoMirror string `json:"kcImageRepoMirror" yaml:"kcImageRepoMirror,omitempty"`
}
type MQ ¶
type MQ struct { External bool `json:"external" yaml:"external,omitempty"` TLS bool `json:"tls" yaml:"tls,omitempty"` CA string `json:"ca" yaml:"ca,omitempty"` ClientCert string `json:"clientCert" yaml:"clientCert,omitempty"` ClientKey string `json:"clientKey" yaml:"clientKey,omitempty"` IPs []string `json:"ips" yaml:"ips,omitempty"` Port int `json:"port" yaml:"port,omitempty"` ClusterPort int `json:"clusterPort" yaml:"clusterPort,omitempty"` User string `json:"user" yaml:"user,omitempty"` Secret string `json:"secret" yaml:"secret,omitempty"` }
type Metadata ¶ added in v1.2.0
type Metadata struct { AgentID string `json:"agentID" yaml:"agentID,omitempty"` Region string `json:"region" yaml:"region,omitempty"` FloatIP string `json:"floatIP" yaml:"floatIP,omitempty"` // proxy server for proxy kc-server(mq and static server) ProxyServer string `json:"proxyServer" yaml:"proxyServer,omitempty"` // address for server to access k8s apiserver ProxyAPIServer string `json:"proxyAPIServer" yaml:"proxyAPIServer,omitempty"` // address for server to access node's ssh ProxySSH string `json:"proxySSH" yaml:"proxySSH,omitempty"` }
Metadata user custom node info,region will use by filter,use label,others use annotation.
Click to show internal directories.
Click to hide internal directories.