Documentation ¶
Index ¶
- Constants
- Variables
- type Agent
- type AgentJob
- type AgentReportStatusResponse
- type AgentState
- type AgentStatus
- type AgentStatusFlag
- type Certificate
- type CertificateCollection
- type CertificateKeyPair
- type Cluster
- type ClusterStatus
- type ConditionCheckedResult
- type CreateClusterResponse
- type DNSDeploymentSettings
- type DockerImage
- type DockerImageCollection
- type GetCertificateResponse
- type GetNextAgentJobResponse
- type LightningMonkeyAgent
- type LightningMonkeyAgentReportStatus
- type LightningMonkeyAgentReportStatusItem
- type LightningMonkeyCertificateCollection
- type LightningMonkeyClusterSettings
- type NetworkStackSettings
- type RegisterAgentResponse
- type Response
Constants ¶
View Source
const ( AgentJob_Deploy_Master = "MASTER" AgentJob_Deploy_ETCD = "ETCD" AgentJob_Deploy_Minion = "Minion" AgentJob_Deploy_NetworkStack_KubeRouter = "Kube-Router" AgentJob_NOP = "NOP" AgentStatus_Registered = "New" AgentStatus_Running = "Running" AgentStatus_Provisioning = "Provisioning" AgentStatus_Provision_Succeed = "Provision Succeed" AgentStatus_Provision_Failed = "Provision Failed" AgentReport_Provision = "Provision" AgentReport_Heartbeat = "Heartbeat" MaxAgentReportTimeoutSecs = 30 )
View Source
const ( AgentRole_Master = "master" AgentRole_ETCD = "etcd" AgentRole_Minion = "minion" ClusterNew = "New" ClusterProvisioning = "Provisiong" ClusterUncontrollable = "Uncontrollable" ClusterReady = "Ready" ClusterDeleted = "ClusterDeleted" ClusterBlockedAgentRegistering = "ClusterBlockedAgentRegistering" ConditionConfirmed ConditionCheckedResult ConditionNotConfirmed ConditionInapplicable MasterSettings_PodCIDR = "pod_ip_cidr" MasterSettings_ServiceCIDR = "service_ip_cidr" MasterSettings_ServiceDNSDomain = "service_dns_domain" MasterSettings_KubernetesVersion = "k8s_version" MasterSettings_DockerRegistry = "docker_registry" MasterSettings_MaxPodCountPerNode = "max_pod_count" MasterSettings_ServiceDNSClusterIP = "service_dns_cluster_ip" NetworkStack_Flannel = "flannel" NetworkStack_Calico = "calico" NetworkStack_KubeRouter = "kuberouter" DNS_KubeDNS = "kubedns" DNS_CoreDNS = "coredns" AgentStatusFlag_Whatever AgentStatusFlag AgentStatusFlag_Running AgentStatusFlag_Provisioned )
View Source
const ( Succeed int = 0 BizError int = 40000 ParameterError int = 40001 DeserializeError int = 40002 UnsupportedError int = 40003 AuthError int = 40004 OperationFailed int = 40005 ResourceHasBeingDeleted int = 40006 NotFound int = 40007 InternalError int = 50000 RESPONSEINFO = "HTTP_RESPONSE_INFO" DockerImageDownloadType_Registry = "REGISTRY" DockerImageDownloadType_HTTP = "HTTP" )
Variables ¶
View Source
var (
HTTPDockerImageDownloadToken = ""
)
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct { ClusterId string `json:"cluster_id"` MetadataId string `json:"metadata_id"` Hostname string `json:"hostname"` LastReportIP string `json:"last_report_ip"` LastReportStatus string `json:"last_report_status"` LastReportTime time.Time `json:"last_report_time"` Reason string `json:"reason"` HasProvisionedMasterComponents bool `json:"provisioned_master_components"` MasterComponentsProvisionTime time.Time `json:"master_components_provision_time"` HasProvisionedETCD bool `json:"provisioned_etcd"` ETCDProvisionTime time.Time `json:"etcd_provision_time"` HasProvisionedMinion bool `json:"provisioned_minion"` MinionProvisionTime time.Time `json:"minion_provision_time"` IsDelete bool `json:"is_delete"` HasETCDRole bool `json:"has_etcd_role"` HasMasterRole bool `json:"has_master_role"` HasMinionRole bool `json:"has_minion_role"` }
type AgentState ¶
type AgentState struct { LastReportIP string `json:"last_report_ip"` LastReportTime time.Time `json:"last_report_time"` Reason string `json:"reason"` HasProvisionedMasterComponents bool `json:"provisioned_master_components"` HasProvisionedETCD bool `json:"provisioned_etcd"` HasProvisionedMinion bool `json:"provisioned_minion"` }
type AgentStatus ¶
type AgentStatusFlag ¶
type AgentStatusFlag int
type Certificate ¶
type CertificateCollection ¶
type CertificateCollection []*Certificate
func (CertificateCollection) GetCertificateContent ¶
func (c CertificateCollection) GetCertificateContent(name string) string
type CertificateKeyPair ¶
type Cluster ¶
type Cluster struct { Id *bson.ObjectId `json:"id" bson:"_id"` CreateTime time.Time `json:"create_time" bson:"create_time"` HasProvisionedNetworkStack bool `json:"has_provisioned_network_stack" bson:"has_provisioned_network_stack"` NetworkStackProvisionTime time.Time `json:"network_stack_provision_time" bson:"network_stack_provision_time"` LastStatusChangeTime time.Time `json:"last_status_change_time" bson:"last_status_change_time"` Name string `json:"name" bson:"name"` ExpectedETCDCount int `json:"expected_etcd_count" bson:"expected_etcd_count"` ServiceCIDR string `json:"service_cidr" bson:"service_cidr"` KubernetesVersion string `json:"kubernetes_version" bson:"kubernetes_version"` PodNetworkCIDR string `json:"pod_network_cidr" bson:"pod_network_cidr"` SecurityToken string `json:"security_token" bson:"security_token"` Status string `json:"status" bson:"status"` ServiceDNSDomain string `json:"service_dns_domain" bson:"service_dns_domain"` NetworkStack *NetworkStackSettings `json:"network_stack" bson:"network_stack"` }
type ClusterStatus ¶
type ConditionCheckedResult ¶
type ConditionCheckedResult int
type CreateClusterResponse ¶
type DNSDeploymentSettings ¶ added in v0.0.43
type DockerImage ¶
type DockerImageCollection ¶
type DockerImageCollection struct { DownloadType string `json:"download_type"` //"REGISTRY", "HTTP" HTTPDownloadToken string `json:"http_download_token"` Images map[string]DockerImage `json:"images"` }
type GetCertificateResponse ¶
type GetNextAgentJobResponse ¶
type LightningMonkeyAgent ¶
type LightningMonkeyAgent struct { Id string `json:"id" bson:"_id"` ClusterId string `json:"cluster_id" bson:"cluster_id"` AdminCertificate string `json:"admin_certificate"` //not exist if it has not master role. Hostname string `json:"hostname" bson:"hostname"` IsDelete bool `json:"is_delete" bson:"is_delete"` HasETCDRole bool `json:"has_etcd_role" bson:"has_etcd_role"` HasMasterRole bool `json:"has_master_role" bson:"has_master_role"` HasMinionRole bool `json:"has_minion_role" bson:"has_minion_role"` State *AgentState `json:"-"` }
func (*LightningMonkeyAgent) IsRunning ¶
func (a *LightningMonkeyAgent) IsRunning() bool
type LightningMonkeyAgentReportStatus ¶
type LightningMonkeyAgentReportStatus struct { IP string `json:"ip"` Items map[string]LightningMonkeyAgentReportStatusItem `json:"items"` LeaseId int64 `json:"lease_id"` }
type LightningMonkeyCertificateCollection ¶
type LightningMonkeyCertificateCollection []*CertificateKeyPair
func (LightningMonkeyCertificateCollection) GetCertificateContent ¶
func (c LightningMonkeyCertificateCollection) GetCertificateContent(name string) string
type LightningMonkeyClusterSettings ¶
type LightningMonkeyClusterSettings struct { Id string `json:"id"` CreateTime time.Time `json:"create_time"` Name string `json:"name"` ExpectedETCDCount int `json:"expected_etcd_count"` ServiceCIDR string `json:"service_cidr"` KubernetesVersion string `json:"kubernetes_version"` PodNetworkCIDR string `json:"pod_network_cidr"` SecurityToken string `json:"security_token"` ServiceDNSDomain string `json:"service_dns_domain"` ServiceDNSClusterIP string `json:"service_dns_cluster_ip"` MaximumAllowedPodCountPerNode int `json:"maximum_allowed_pod_count_per_node"` NetworkStack *NetworkStackSettings `json:"network_stack"` DNSSettings *DNSDeploymentSettings `json:"dns_deployment_settings"` }
type NetworkStackSettings ¶
type RegisterAgentResponse ¶
Click to show internal directories.
Click to hide internal directories.