controllers

package
v0.5.0-b37f1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// upgrade template
	CAPI_VSPHERE_UPGRADE_TEMPLATE = "capi-vsphere-upgrade-template"

	// machine을 구분하기 위한 label key
	CAPI_CLUSTER_LABEL_KEY      = "cluster.x-k8s.io/cluster-name"
	CAPI_CONTROLPLANE_LABEL_KEY = "cluster.x-k8s.io/control-plane"
	CAPI_WORKER_LABEL_KEY       = "cluster.x-k8s.io/deployment-name"
)

Variables

This section is empty.

Functions

func MakeServiceInstance

func MakeServiceInstance(clusterManager *clusterV1alpha1.ClusterManager, serviceInstanceName string, json []byte, upgrade bool) *servicecatalogv1beta1.ServiceInstance

func Marshaling

func Marshaling(parameter Parameters, clusterManager clusterV1alpha1.ClusterManager) ([]byte, error)

parameter에 clustermanager spec 값을 넣어 marshaling해서 리턴하는 메서드

func SetApplicationLink(c *clusterV1alpha1.ClusterManager, subdomain string)

Types

type AwsParameter

type AwsParameter struct {
	SshKey         string
	Region         string
	MasterType     string
	WorkerType     string
	MasterDiskSize int
	WorkerDiskSize int
}

func (*AwsParameter) SetParameter

func (p *AwsParameter) SetParameter(clusterManager clusterV1alpha1.ClusterManager)

type ClusterManagerReconciler

type ClusterManagerReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

ClusterManagerReconciler reconciles a ClusterManager object

func (*ClusterManagerReconciler) CheckApplicationRemains

func (r *ClusterManagerReconciler) CheckApplicationRemains(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) ClusterUpgrade

func (r *ClusterManagerReconciler) ClusterUpgrade(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

cluster를 upgrade한다. vsphere의 경우, serviceinstance 생성이 필요하다.

func (*ClusterManagerReconciler) ControlplaneScaling

func (r *ClusterManagerReconciler) ControlplaneScaling(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

controlplane을 scaling한다.

func (*ClusterManagerReconciler) CreateApplication

func (r *ClusterManagerReconciler) CreateApplication(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateArgocdResources

func (r *ClusterManagerReconciler) CreateArgocdResources(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) CreateCertificate

func (r *ClusterManagerReconciler) CreateCertificate(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateGatewayEndpoint

func (r *ClusterManagerReconciler) CreateGatewayEndpoint(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateGatewayResources

func (r *ClusterManagerReconciler) CreateGatewayResources(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (reconcile.Result, error)

func (*ClusterManagerReconciler) CreateGatewayService

func (r *ClusterManagerReconciler) CreateGatewayService(clusterManager *clusterV1alpha1.ClusterManager, annotationKey string) error

func (*ClusterManagerReconciler) CreateHyperAuthResources

func (r *ClusterManagerReconciler) CreateHyperAuthResources(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (reconcile.Result, error)

func (*ClusterManagerReconciler) CreateIngress

func (r *ClusterManagerReconciler) CreateIngress(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateMiddleware

func (r *ClusterManagerReconciler) CreateMiddleware(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateServiceAccountSecret

func (r *ClusterManagerReconciler) CreateServiceAccountSecret(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) CreateServiceInstance

func (r *ClusterManagerReconciler) CreateServiceInstance(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) CreateTraefikResources

func (r *ClusterManagerReconciler) CreateTraefikResources(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) CreateUpgradeServiceInstance

func (r *ClusterManagerReconciler) CreateUpgradeServiceInstance(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) DeleteCertSecret

func (r *ClusterManagerReconciler) DeleteCertSecret(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteCertificate

func (r *ClusterManagerReconciler) DeleteCertificate(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteDeprecatedPrometheusResources

func (r *ClusterManagerReconciler) DeleteDeprecatedPrometheusResources(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteDeprecatedTraefikResources

func (r *ClusterManagerReconciler) DeleteDeprecatedTraefikResources(clusterManager *clusterV1alpha1.ClusterManager) (bool, error)

func (*ClusterManagerReconciler) DeleteEndpoint

func (r *ClusterManagerReconciler) DeleteEndpoint(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteGatewayEndpoint

func (r *ClusterManagerReconciler) DeleteGatewayEndpoint(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteGatewayService

func (r *ClusterManagerReconciler) DeleteGatewayService(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteHyperAuthResourcesForSingleCluster

func (r *ClusterManagerReconciler) DeleteHyperAuthResourcesForSingleCluster(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteIngress

func (r *ClusterManagerReconciler) DeleteIngress(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteLoadBalancerServices

func (r *ClusterManagerReconciler) DeleteLoadBalancerServices(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteMiddleware

func (r *ClusterManagerReconciler) DeleteMiddleware(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteService

func (r *ClusterManagerReconciler) DeleteService(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) DeleteTraefikResources

func (r *ClusterManagerReconciler) DeleteTraefikResources(clusterManager *clusterV1alpha1.ClusterManager) error

func (*ClusterManagerReconciler) GetControlplaneMachineList

func (r *ClusterManagerReconciler) GetControlplaneMachineList(clusterManager *clusterV1alpha1.ClusterManager) ([]capiV1alpha3.Machine, error)

controlplane machine list를 반환

func (*ClusterManagerReconciler) GetKubeconfigSecret

func (r *ClusterManagerReconciler) GetKubeconfigSecret(clusterManager *clusterV1alpha1.ClusterManager) (*coreV1.Secret, error)

func (*ClusterManagerReconciler) GetMachineList

func (r *ClusterManagerReconciler) GetMachineList(clusterManager *clusterV1alpha1.ClusterManager, controlplane bool) ([]capiV1alpha3.Machine, error)

controlplane, worker에 따른 machine list를 반환한다.

func (*ClusterManagerReconciler) GetUpgradeControlplaneMachines

func (r *ClusterManagerReconciler) GetUpgradeControlplaneMachines(clusterManager *clusterV1alpha1.ClusterManager) (MachineUpgradeList, error)

controlplane machine들의 MachineUpgradeList를 반환

func (*ClusterManagerReconciler) GetUpgradeMachinesInfo

func (r *ClusterManagerReconciler) GetUpgradeMachinesInfo(clusterManager *clusterV1alpha1.ClusterManager, machines []capiV1alpha3.Machine) (MachineUpgradeList, error)

func (*ClusterManagerReconciler) GetUpgradeWorkerMachines

func (r *ClusterManagerReconciler) GetUpgradeWorkerMachines(clusterManager *clusterV1alpha1.ClusterManager) (MachineUpgradeList, error)

worker machine들의 MachineUpgradeList를 반환

func (*ClusterManagerReconciler) GetWorkerMachineList

func (r *ClusterManagerReconciler) GetWorkerMachineList(clusterManager *clusterV1alpha1.ClusterManager) ([]capiV1alpha3.Machine, error)

worker machine list를 반환

func (*ClusterManagerReconciler) ReadyReconcilePhase

func (r *ClusterManagerReconciler) ReadyReconcilePhase(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

reconcile시작 전 필요한 동작들을 수행

func (*ClusterManagerReconciler) Reconcile

func (r *ClusterManagerReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ClusterManagerReconciler) SetEndpoint

func (r *ClusterManagerReconciler) SetEndpoint(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) SetupWithManager

func (r *ClusterManagerReconciler) SetupWithManager(mgr ctrl.Manager) error

func (*ClusterManagerReconciler) UpdateClusterManagerStatus

func (r *ClusterManagerReconciler) UpdateClusterManagerStatus(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

func (*ClusterManagerReconciler) WorkerScaling

func (r *ClusterManagerReconciler) WorkerScaling(ctx context.Context, clusterManager *clusterV1alpha1.ClusterManager) (ctrl.Result, error)

worker를 scaling한다.

type ClusterParameter

type ClusterParameter struct {
	Namespace         string
	ClusterName       string
	MasterNum         int
	WorkerNum         int
	Owner             string
	KubernetesVersion string
	HyperAuthUrl      string
}

func (*ClusterParameter) SetParameter

func (p *ClusterParameter) SetParameter(clusterManager clusterV1alpha1.ClusterManager)

type ClusterRegistrationReconciler

type ClusterRegistrationReconciler struct {
	client.Client
	Log    logr.Logger
	Scheme *runtime.Scheme
}

ClusterRegistrationReconciler reconciles a ClusterRegistration object

func (*ClusterRegistrationReconciler) CheckValidation

func (r *ClusterRegistrationReconciler) CheckValidation(ctx context.Context, ClusterRegistration *clusterV1alpha1.ClusterRegistration) (ctrl.Result, error)

func (*ClusterRegistrationReconciler) CreateClusterManager

func (r *ClusterRegistrationReconciler) CreateClusterManager(ctx context.Context, ClusterRegistration *clusterV1alpha1.ClusterRegistration) (ctrl.Result, error)

func (*ClusterRegistrationReconciler) CreateKubeconfigSecret

func (r *ClusterRegistrationReconciler) CreateKubeconfigSecret(ctx context.Context, ClusterRegistration *clusterV1alpha1.ClusterRegistration) (ctrl.Result, error)

func (*ClusterRegistrationReconciler) Reconcile

func (r *ClusterRegistrationReconciler) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*ClusterRegistrationReconciler) SetupWithManager

func (r *ClusterRegistrationReconciler) SetupWithManager(mgr ctrl.Manager) error

type MachineUpgradeList

type MachineUpgradeList struct {
	// 새로운 version의 머신 이름 리스트
	NewMachineList []string
	// 이전 version의 머신 이름 리스트
	OldMachineList []string
	// Running 상태의 새로운 Version 머신 이름 리스트
	NewMachineRunningList []string
}

func (*MachineUpgradeList) SetMachines

func (m *MachineUpgradeList) SetMachines(new []string, old []string, newRunning []string)

type Parameters

type Parameters interface {
	SetParameter(clusterV1alpha1.ClusterManager)
}

type VsphereParameter

type VsphereParameter struct {
	PodCidr             string
	VcenterIp           string
	VcenterId           string
	VcenterPassword     string
	VcenterThumbprint   string
	VcenterNetwork      string
	VcenterDataCenter   string
	VcenterDataStore    string
	VcenterFolder       string
	VcenterResourcePool string
	VcenterKcpIp        string
	VcenterCpuNum       int
	VcenterMemSize      int
	VcenterDiskSize     int
	VcenterTemplate     string
}

func (*VsphereParameter) SetParameter

func (p *VsphereParameter) SetParameter(clusterManager clusterV1alpha1.ClusterManager)

type VsphereUpgradeParameter

type VsphereUpgradeParameter struct {
	Namespace           string
	ClusterName         string
	VcenterIp           string
	VcenterThumbprint   string
	VcenterNetwork      string
	VcenterDataCenter   string
	VcenterDataStore    string
	VcenterFolder       string
	VcenterResourcePool string
	VcenterCpuNum       int
	VcenterMemSize      int
	VcenterDiskSize     int
	VcenterTemplate     string
	KubernetesVersion   string
}

func (*VsphereUpgradeParameter) SetParameter

func (p *VsphereUpgradeParameter) SetParameter(clusterManager clusterV1alpha1.ClusterManager)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL