resources

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhaseUploadConfigKubeadm kubeadmPhase = iota
	PhaseUploadConfigKubelet
	PhaseBootstrapToken
	PhaseClusterAdminRBAC
)
View Source
const (
	AdminKubeConfigFileName             = kubeadmconstants.AdminKubeConfigFileName
	SuperAdminKubeConfigFileName        = kubeadmconstants.SuperAdminKubeConfigFileName
	ControllerManagerKubeConfigFileName = kubeadmconstants.ControllerManagerKubeConfigFileName
	SchedulerKubeConfigFileName         = kubeadmconstants.SchedulerKubeConfigFileName
)
View Source
const (
	OperationResultEnqueueBack controllerutil.OperationResult = "enqueueBack"
)

Variables

This section is empty.

Functions

func GetKubeadmManifestDeps added in v0.2.0

func GetKubeadmManifestDeps(ctx context.Context, client client.Client, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (*clientset.Clientset, *kubeadm.Configuration, error)

func Handle

func Handle(ctx context.Context, resource Resource, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (controllerutil.OperationResult, error)

Handle handles the given resource and returns a boolean to say if the tenantControlPlane has been modified.

func HandleDeletion added in v0.1.0

func HandleDeletion(ctx context.Context, resource DeletableResource, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

HandleDeletion handles the deletion of the given resource.

func KubeadmPhaseCreate added in v0.1.0

func KubeadmPhaseCreate(ctx context.Context, r KubeadmPhaseResource, logger logr.Logger, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (controllerutil.OperationResult, error)

Types

type APIServerCertificate

type APIServerCertificate struct {
	Client       client.Client
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*APIServerCertificate) CleanUp

func (*APIServerCertificate) CreateOrUpdate

func (r *APIServerCertificate) CreateOrUpdate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (res controllerutil.OperationResult, err error)

func (*APIServerCertificate) Define

func (r *APIServerCertificate) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*APIServerCertificate) GetClient

func (r *APIServerCertificate) GetClient() client.Client

func (*APIServerCertificate) GetName

func (r *APIServerCertificate) GetName() string

func (*APIServerCertificate) GetTmpDirectory

func (r *APIServerCertificate) GetTmpDirectory() string

func (*APIServerCertificate) ShouldCleanup

func (*APIServerCertificate) ShouldStatusBeUpdated

func (r *APIServerCertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*APIServerCertificate) UpdateTenantControlPlaneStatus

func (r *APIServerCertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type APIServerKubeletClientCertificate

type APIServerKubeletClientCertificate struct {
	Client       client.Client
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*APIServerKubeletClientCertificate) CleanUp

func (*APIServerKubeletClientCertificate) CreateOrUpdate

func (*APIServerKubeletClientCertificate) Define

func (*APIServerKubeletClientCertificate) GetClient

func (*APIServerKubeletClientCertificate) GetName

func (*APIServerKubeletClientCertificate) GetTmpDirectory

func (r *APIServerKubeletClientCertificate) GetTmpDirectory() string

func (*APIServerKubeletClientCertificate) ShouldCleanup

func (*APIServerKubeletClientCertificate) ShouldStatusBeUpdated

func (r *APIServerKubeletClientCertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*APIServerKubeletClientCertificate) UpdateTenantControlPlaneStatus

func (r *APIServerKubeletClientCertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type CACertificate

type CACertificate struct {
	Client       client.Client
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*CACertificate) CleanUp

func (*CACertificate) CreateOrUpdate

func (r *CACertificate) CreateOrUpdate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (controllerutil.OperationResult, error)

func (*CACertificate) Define

func (r *CACertificate) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*CACertificate) GetClient

func (r *CACertificate) GetClient() client.Client

func (*CACertificate) GetName

func (r *CACertificate) GetName() string

func (*CACertificate) GetTmpDirectory

func (r *CACertificate) GetTmpDirectory() string

func (*CACertificate) ShouldCleanup

func (*CACertificate) ShouldStatusBeUpdated

func (r *CACertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*CACertificate) UpdateTenantControlPlaneStatus

func (r *CACertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type DeletableResource added in v0.2.0

type DeletableResource interface {
	GetName() string
	Define(context.Context, *kamajiv1alpha1.TenantControlPlane) error
	Delete(context.Context, *kamajiv1alpha1.TenantControlPlane) error
}

type FrontProxyCACertificate

type FrontProxyCACertificate struct {
	Client       client.Client
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*FrontProxyCACertificate) CleanUp

func (*FrontProxyCACertificate) CreateOrUpdate

func (*FrontProxyCACertificate) Define

func (*FrontProxyCACertificate) GetClient

func (r *FrontProxyCACertificate) GetClient() client.Client

func (*FrontProxyCACertificate) GetName

func (r *FrontProxyCACertificate) GetName() string

func (*FrontProxyCACertificate) GetTmpDirectory

func (r *FrontProxyCACertificate) GetTmpDirectory() string

func (*FrontProxyCACertificate) ShouldCleanup

func (*FrontProxyCACertificate) ShouldStatusBeUpdated

func (r *FrontProxyCACertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*FrontProxyCACertificate) UpdateTenantControlPlaneStatus

func (r *FrontProxyCACertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type FrontProxyClientCertificate

type FrontProxyClientCertificate struct {
	Client       client.Client
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*FrontProxyClientCertificate) CleanUp

func (*FrontProxyClientCertificate) CreateOrUpdate

func (*FrontProxyClientCertificate) Define

func (*FrontProxyClientCertificate) GetClient

func (r *FrontProxyClientCertificate) GetClient() client.Client

func (*FrontProxyClientCertificate) GetName

func (r *FrontProxyClientCertificate) GetName() string

func (*FrontProxyClientCertificate) GetTmpDirectory

func (r *FrontProxyClientCertificate) GetTmpDirectory() string

func (*FrontProxyClientCertificate) ShouldCleanup

func (*FrontProxyClientCertificate) ShouldStatusBeUpdated

func (r *FrontProxyClientCertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*FrontProxyClientCertificate) UpdateTenantControlPlaneStatus

func (r *FrontProxyClientCertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type HandlerConfig

type HandlerConfig struct {
	Resource           Resource
	TenantControlPlane *kamajiv1alpha1.TenantControlPlane
}

type KubeadmConfigResource

type KubeadmConfigResource struct {
	Client       client.Client
	ETCDs        []string
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*KubeadmConfigResource) CleanUp

func (*KubeadmConfigResource) CreateOrUpdate

func (*KubeadmConfigResource) Define

func (r *KubeadmConfigResource) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*KubeadmConfigResource) GetName

func (r *KubeadmConfigResource) GetName() string

func (*KubeadmConfigResource) ShouldCleanup

func (*KubeadmConfigResource) ShouldStatusBeUpdated

func (r *KubeadmConfigResource) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubeadmConfigResource) UpdateTenantControlPlaneStatus

func (r *KubeadmConfigResource) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubeadmPhase

type KubeadmPhase struct {
	Client client.Client
	Phase  kubeadmPhase
	// contains filtered or unexported fields
}

func (*KubeadmPhase) CleanUp added in v0.1.0

func (*KubeadmPhase) CreateOrUpdate added in v0.1.0

func (r *KubeadmPhase) CreateOrUpdate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (controllerutil.OperationResult, error)

func (*KubeadmPhase) Define added in v0.1.0

func (*KubeadmPhase) GetClient added in v0.1.0

func (r *KubeadmPhase) GetClient() client.Client

func (*KubeadmPhase) GetKubeadmFunction added in v0.1.0

func (*KubeadmPhase) GetName added in v0.1.0

func (r *KubeadmPhase) GetName() string

func (*KubeadmPhase) GetPredicateFunc added in v0.2.0

func (r *KubeadmPhase) GetPredicateFunc() func(obj client.Object) bool

func (*KubeadmPhase) GetStatus added in v0.1.0

func (*KubeadmPhase) GetTmpDirectory added in v0.1.0

func (r *KubeadmPhase) GetTmpDirectory() string

func (*KubeadmPhase) GetWatchedObject added in v0.2.0

func (r *KubeadmPhase) GetWatchedObject() client.Object

func (*KubeadmPhase) SetKubeadmConfigChecksum added in v0.1.0

func (r *KubeadmPhase) SetKubeadmConfigChecksum(checksum string)

func (*KubeadmPhase) ShouldCleanup added in v0.1.0

func (*KubeadmPhase) ShouldStatusBeUpdated added in v0.1.0

func (r *KubeadmPhase) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubeadmPhase) UpdateTenantControlPlaneStatus added in v0.1.0

func (r *KubeadmPhase) UpdateTenantControlPlaneStatus(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubeadmPhaseResource

type KubeadmPhaseResource interface {
	Resource
	KubeadmResource
	GetClient() client.Client
	GetKubeadmFunction(context.Context, *kamajiv1alpha1.TenantControlPlane) (func(clientset.Interface, *kubeadm.Configuration) ([]byte, error), error)
	GetStatus(*kamajiv1alpha1.TenantControlPlane) (kamajiv1alpha1.KubeadmConfigChecksumDependant, error)
	SetKubeadmConfigChecksum(string)
	GetWatchedObject() client.Object
	GetPredicateFunc() func(obj client.Object) bool
}

type KubeadmResource

type KubeadmResource interface {
	GetClient() client.Client
	GetTmpDirectory() string
}

type KubeconfigResource

type KubeconfigResource struct {
	Client             client.Client
	Name               string
	KubeConfigFileName string
	TmpDirectory       string
	// contains filtered or unexported fields
}

func (*KubeconfigResource) CleanUp

func (*KubeconfigResource) CreateOrUpdate

func (*KubeconfigResource) Define

func (r *KubeconfigResource) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*KubeconfigResource) GetClient

func (r *KubeconfigResource) GetClient() client.Client

func (*KubeconfigResource) GetName

func (r *KubeconfigResource) GetName() string

func (*KubeconfigResource) GetTmpDirectory

func (r *KubeconfigResource) GetTmpDirectory() string

func (*KubeconfigResource) ShouldCleanup

func (*KubeconfigResource) ShouldStatusBeUpdated

func (r *KubeconfigResource) ShouldStatusBeUpdated(_ context.Context, tcp *kamajiv1alpha1.TenantControlPlane) bool

func (*KubeconfigResource) UpdateTenantControlPlaneStatus

func (r *KubeconfigResource) UpdateTenantControlPlaneStatus(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubernetesDeploymentResource

type KubernetesDeploymentResource struct {
	Client             client.Client
	DataStore          kamajiv1alpha1.DataStore
	Name               string
	KineContainerImage string
	// contains filtered or unexported fields
}

func (*KubernetesDeploymentResource) CleanUp

func (*KubernetesDeploymentResource) CreateOrUpdate

func (*KubernetesDeploymentResource) Define

func (*KubernetesDeploymentResource) GetName

func (r *KubernetesDeploymentResource) GetName() string

func (*KubernetesDeploymentResource) ShouldCleanup

func (*KubernetesDeploymentResource) ShouldStatusBeUpdated

func (r *KubernetesDeploymentResource) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubernetesDeploymentResource) UpdateTenantControlPlaneStatus

func (r *KubernetesDeploymentResource) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubernetesIngressResource

type KubernetesIngressResource struct {
	Client client.Client
	Name   string
	// contains filtered or unexported fields
}

func (*KubernetesIngressResource) CleanUp

func (*KubernetesIngressResource) CreateOrUpdate

func (*KubernetesIngressResource) Define

func (*KubernetesIngressResource) GetName

func (r *KubernetesIngressResource) GetName() string

func (*KubernetesIngressResource) ShouldCleanup

func (*KubernetesIngressResource) ShouldStatusBeUpdated

func (*KubernetesIngressResource) UpdateTenantControlPlaneStatus

func (r *KubernetesIngressResource) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubernetesServiceResource

type KubernetesServiceResource struct {
	Client client.Client
	// contains filtered or unexported fields
}

KubernetesServiceResource must be the first Resource processed by the TenantControlPlane: when a TenantControlPlan is expecting a dynamic IP address, the Service will get it from the controller-manager.

func (*KubernetesServiceResource) CleanUp

func (*KubernetesServiceResource) CreateOrUpdate

func (*KubernetesServiceResource) Define

func (*KubernetesServiceResource) GetName

func (r *KubernetesServiceResource) GetName() string

func (*KubernetesServiceResource) ShouldCleanup

func (*KubernetesServiceResource) ShouldStatusBeUpdated

func (r *KubernetesServiceResource) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubernetesServiceResource) UpdateTenantControlPlaneStatus

func (r *KubernetesServiceResource) UpdateTenantControlPlaneStatus(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubernetesUpgrade

type KubernetesUpgrade struct {
	Client client.Client
	// contains filtered or unexported fields
}

func (*KubernetesUpgrade) CleanUp

func (*KubernetesUpgrade) CreateOrUpdate

func (*KubernetesUpgrade) Define

func (k *KubernetesUpgrade) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*KubernetesUpgrade) GetName

func (k *KubernetesUpgrade) GetName() string

func (*KubernetesUpgrade) ShouldCleanup

func (*KubernetesUpgrade) ShouldStatusBeUpdated

func (*KubernetesUpgrade) UpdateTenantControlPlaneStatus

func (k *KubernetesUpgrade) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type SACertificate

type SACertificate struct {
	Client       client.Client
	Name         string
	TmpDirectory string
	// contains filtered or unexported fields
}

func (*SACertificate) CleanUp

func (*SACertificate) CreateOrUpdate

func (r *SACertificate) CreateOrUpdate(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (controllerutil.OperationResult, error)

func (*SACertificate) Define

func (r *SACertificate) Define(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

func (*SACertificate) GetClient

func (r *SACertificate) GetClient() client.Client

func (*SACertificate) GetName

func (r *SACertificate) GetName() string

func (*SACertificate) GetTmpDirectory

func (r *SACertificate) GetTmpDirectory() string

func (*SACertificate) ShouldCleanup

func (*SACertificate) ShouldStatusBeUpdated

func (r *SACertificate) ShouldStatusBeUpdated(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*SACertificate) UpdateTenantControlPlaneStatus

func (r *SACertificate) UpdateTenantControlPlaneStatus(_ context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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