Documentation
¶
Index ¶
- Variables
- type Cloud
- type CloudRepo
- type CloudUsecase
- func (uc *CloudUsecase) InstallKubeadmKubeletCriO(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) KubeadmInit(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) KubeadmJoin(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) KubeadmReset(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) KubeadmUpgrade(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) KubeadmUpgradePlan(ctx context.Context, cloud *Cloud) error
- func (uc *CloudUsecase) NodeInit(ctx context.Context, cloud *Cloud) error
- type System
- type SystemRepo
- type SystemUsecase
Constants ¶
This section is empty.
Variables ¶
View Source
var ( NodeInitShell string = "init.sh" KubernetesSowfwareShell string = "kubernetes-software.sh" )
View Source
var ARCH_MAP = map[string]string{
"x86_64": "amd64",
"aarch64": "arm64",
}
View Source
var KubeProxyConfig = `apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration`
View Source
var KubeadmClusterConfig = `` /* 243-byte string literal not displayed */
kubeadm-cluster.conf
View Source
var KubeadmInitConfig = fmt.Sprintf(`apiVersion: kubeadm.k8s.io/v1beta4
kind: InitConfiguration
localAPIEndpoint:
advertiseAddress: %s
bindPort: 6443`, "192.168.1.1")
kubeadm-init.conf
View Source
var KubeadmJoinConfig = `` /* 146-byte string literal not displayed */
kubeadm-join.conf
View Source
var KubeadmResetConfig = `apiVersion: kubeadm.k8s.io/v1beta4
kind: ResetConfiguration`
View Source
var KubeadmUpgradeConfig = `apiVersion: kubeadm.k8s.io/v1beta4
kind: UpgradeConfiguration`
View Source
var KubeletConfig = `apiVersion: kubelet.config.k8s.io/v1
kind: KubeletConfiguration`
View Source
var ProviderSet = wire.NewSet(NewSystemUseCase, NewCloudUseCase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type Cloud ¶
type Cloud struct { ID int64 `json:"id" gorm:"column:id;primaryKey;AUTO_INCREMENT"` NodeID int64 `json:"node_id" gorm:"column:node_id"` NodeName string `json:"node_name" gorm:"column:node_name"` ClusterVersion string `json:"cluster_version" gorm:"column:cluster_version"` Token string `json:"token" gorm:"column:token"` DiscoveryTokenCACertHash string `json:"discovery_token_ca_cert_hash" gorm:"column:discovery_token_ca_cert_hash"` ControlPlaneEndpoint string `json:"control_plane_endpoint" gorm:"column:control_plane_endpoint"` JoinConfig string `json:"join_config" gorm:"column:join_config"` }
type CloudUsecase ¶
type CloudUsecase struct {
// contains filtered or unexported fields
}
func NewCloudUseCase ¶
func (*CloudUsecase) InstallKubeadmKubeletCriO ¶
func (uc *CloudUsecase) InstallKubeadmKubeletCriO(ctx context.Context, cloud *Cloud) error
func (*CloudUsecase) KubeadmInit ¶
func (uc *CloudUsecase) KubeadmInit(ctx context.Context, cloud *Cloud) error
func (*CloudUsecase) KubeadmJoin ¶
func (uc *CloudUsecase) KubeadmJoin(ctx context.Context, cloud *Cloud) error
func (*CloudUsecase) KubeadmReset ¶
func (uc *CloudUsecase) KubeadmReset(ctx context.Context, cloud *Cloud) error
kubeadm reset
func (*CloudUsecase) KubeadmUpgrade ¶
func (uc *CloudUsecase) KubeadmUpgrade(ctx context.Context, cloud *Cloud) error
kubeadm upgrade
func (*CloudUsecase) KubeadmUpgradePlan ¶
func (uc *CloudUsecase) KubeadmUpgradePlan(ctx context.Context, cloud *Cloud) error
kubeadm upgrade plan
type System ¶
type System struct { ID int64 `json:"id" gorm:"column:id;primaryKey;AUTO_INCREMENT"` OS string `json:"os" gorm:"column:os; default:''; NOT NULL"` OSInfo string `json:"os_info" gorm:"column:os_info; default:''; NOT NULL"` ARCH string `json:"arch" gorm:"column:arch; default:''; NOT NULL"` CPU int32 `json:"cpu" gorm:"column:cpu; default:0; NOT NULL"` Memory int32 `json:"memory" gorm:"column:memory; default:0; NOT NULL"` GPU int32 `json:"gpu" gorm:"column:gpu; default:0; NOT NULL"` GpuSpec string `json:"gpu_spec" gorm:"column:gpu_spec; default:''; NOT NULL"` DataDisk int32 `json:"data_disk" gorm:"column:data_disk; default:0; NOT NULL"` Kernel string `json:"kernel" gorm:"column:kernel; default:''; NOT NULL"` Container string `json:"container" gorm:"column:container; default:''; NOT NULL"` Kubelet string `json:"kubelet" gorm:"column:kubelet; default:''; NOT NULL"` KubeProxy string `json:"kube_proxy" gorm:"column:kube_proxy; default:''; NOT NULL"` InternalIP string `json:"internal_ip" gorm:"column:internal_ip; default:''; NOT NULL"` MachineID string `json:"machine_id" gorm:"column:machine_id; default:''; NOT NULL"` }
type SystemRepo ¶
type SystemUsecase ¶
type SystemUsecase struct { SystemRepo SystemRepo // contains filtered or unexported fields }
func NewSystemUseCase ¶
func NewSystemUseCase(systemRepo SystemRepo, logger log.Logger) *SystemUsecase
func (*SystemUsecase) GetSystem ¶
func (s *SystemUsecase) GetSystem(ctx context.Context) (*System, error)
func (*SystemUsecase) InstallSoftware ¶
func (s *SystemUsecase) InstallSoftware(softwares ...string) error
Click to show internal directories.
Click to hide internal directories.