Documentation
¶
Index ¶
- Constants
- type ConfigTemplateContent
- type CustomClusterController
- func (r *CustomClusterController) ClusterToCustomClusterMapFunc(o client.Object) []ctrl.Request
- func (r *CustomClusterController) CreateClusterConfig(ctx context.Context, c *clusterv1.Cluster, ...) (*corev1.ConfigMap, error)
- func (r *CustomClusterController) CreateClusterHosts(ctx context.Context, customMachine *v1alpha1.CustomMachine, ...) (*corev1.ConfigMap, error)
- func (r *CustomClusterController) CreateConfigMapWithTemplate(ctx context.Context, name, namespace, fileName, configMapData string) (*corev1.ConfigMap, error)
- func (r *CustomClusterController) CustomMachineToCustomClusterMapFunc(o client.Object) []ctrl.Request
- func (r *CustomClusterController) KcpToCustomClusterMapFunc(o client.Object) []ctrl.Request
- func (r *CustomClusterController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *CustomClusterController) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
- func (r *CustomClusterController) WorkerToCustomClusterMapFunc(o client.Object) []ctrl.Request
- type CustomMachineController
- type HostTemplateContent
- type RelatedResource
Constants ¶
View Source
const ( RequeueAfter = time.Second * 5 ClusterHostsName = "cluster-hosts" ClusterConfigName = "cluster-config" SecreteName = "cluster-secret" ClusterKind = "Cluster" CustomClusterKind = "CustomCluster" CustomClusterInitAction customClusterManageAction = "init" KubesprayInitCMD customClusterManageCMD = "ansible-playbook -i inventory/" + ClusterHostsName + " --private-key /root/.ssh/ssh-privatekey cluster.yml -vvv" CustomClusterTerminateAction customClusterManageAction = "terminate" KubesprayTerminateCMD customClusterManageCMD = "ansible-playbook -e reset_confirmation=yes -i inventory/" + ClusterHostsName + " --private-key /root/.ssh/ssh-privatekey reset.yml -vvv" // TODO: support custom this in CustomCluster/CustomMachine DefaultKubesprayImage = "quay.io/kubespray/kubespray:v2.20.0" // CustomClusterFinalizer is the finalizer applied to crd. CustomClusterFinalizer = "customcluster.cluster.kurator.dev" // custom configmap finalizer requires at least one slash. CustomClusterConfigMapFinalizer = CustomClusterFinalizer + "/configmap" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigTemplateContent ¶
type ConfigTemplateContent struct {
KubeVersion string
PodCIDR string
// CNIType is the CNI plugin of the cluster on VMs. The default plugin is calico and can be ["calico", "cilium", "canal", "flannel"]
CNIType string
}
func GetConfigContent ¶
func GetConfigContent(c *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, cc *v1alpha1.CustomCluster) *ConfigTemplateContent
type CustomClusterController ¶
type CustomClusterController struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
}
CustomClusterController reconciles a CustomCluster object.
func (*CustomClusterController) ClusterToCustomClusterMapFunc ¶
func (r *CustomClusterController) ClusterToCustomClusterMapFunc(o client.Object) []ctrl.Request
func (*CustomClusterController) CreateClusterConfig ¶
func (r *CustomClusterController) CreateClusterConfig(ctx context.Context, c *clusterv1.Cluster, kcp *controlplanev1.KubeadmControlPlane, cc *v1alpha1.CustomCluster) (*corev1.ConfigMap, error)
func (*CustomClusterController) CreateClusterHosts ¶
func (r *CustomClusterController) CreateClusterHosts(ctx context.Context, customMachine *v1alpha1.CustomMachine, customCluster *v1alpha1.CustomCluster) (*corev1.ConfigMap, error)
func (*CustomClusterController) CreateConfigMapWithTemplate ¶
func (*CustomClusterController) CustomMachineToCustomClusterMapFunc ¶
func (r *CustomClusterController) CustomMachineToCustomClusterMapFunc(o client.Object) []ctrl.Request
func (*CustomClusterController) KcpToCustomClusterMapFunc ¶
func (r *CustomClusterController) KcpToCustomClusterMapFunc(o client.Object) []ctrl.Request
func (*CustomClusterController) Reconcile ¶
func (r *CustomClusterController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*CustomClusterController) SetupWithManager ¶
func (r *CustomClusterController) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
func (*CustomClusterController) WorkerToCustomClusterMapFunc ¶
func (r *CustomClusterController) WorkerToCustomClusterMapFunc(o client.Object) []ctrl.Request
type CustomMachineController ¶
type CustomMachineController struct {
client.Client
APIReader client.Reader
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
CustomMachineController reconciles a CustomMachine object
func (*CustomMachineController) SetupWithManager ¶
func (r *CustomMachineController) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error
SetupWithManager sets up the controller with the Manager.
type HostTemplateContent ¶
type HostTemplateContent struct {
NodeAndIP []string
MasterName []string
NodeName []string
EtcdNodeName []string // default: NodeName + MasterName
}
func GetHostsContent ¶
func GetHostsContent(customMachine *v1alpha1.CustomMachine) *HostTemplateContent
type RelatedResource ¶
type RelatedResource struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.