resources

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PhaseUploadConfigKubeadm kubeadmPhase = iota
	PhaseUploadConfigKubelet
	PhaseBootstrapToken
)
View Source
const (
	AdminKubeConfigFileName             = kubeadmconstants.AdminKubeConfigFileName
	ControllerManagerKubeConfigFileName = kubeadmconstants.ControllerManagerKubeConfigFileName
	SchedulerKubeConfigFileName         = kubeadmconstants.SchedulerKubeConfigFileName
)

Variables

This section is empty.

Functions

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 DeleteableResource, 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 DeleteableResource

type DeleteableResource 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 KubeadmAddon added in v0.1.0

type KubeadmAddon int
const (
	AddonCoreDNS KubeadmAddon = iota
	AddonKubeProxy
)

func (KubeadmAddon) String added in v0.1.0

func (d KubeadmAddon) String() string

type KubeadmAddonResource added in v0.1.0

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

func (*KubeadmAddonResource) CleanUp added in v0.1.0

func (r *KubeadmAddonResource) CleanUp(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) (bool, error)

func (*KubeadmAddonResource) CreateOrUpdate added in v0.1.0

func (*KubeadmAddonResource) Define added in v0.1.0

func (*KubeadmAddonResource) GetClient added in v0.1.0

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

func (*KubeadmAddonResource) GetKubeadmFunction added in v0.1.0

func (r *KubeadmAddonResource) GetKubeadmFunction() (func(clientset.Interface, *kubeadm.Configuration) error, error)

func (*KubeadmAddonResource) GetName added in v0.1.0

func (r *KubeadmAddonResource) GetName() string

func (*KubeadmAddonResource) GetStatus added in v0.1.0

func (*KubeadmAddonResource) GetTmpDirectory added in v0.1.0

func (r *KubeadmAddonResource) GetTmpDirectory() string

func (*KubeadmAddonResource) SetKubeadmConfigChecksum added in v0.1.0

func (r *KubeadmAddonResource) SetKubeadmConfigChecksum(checksum string)

func (*KubeadmAddonResource) ShouldCleanup added in v0.1.0

func (r *KubeadmAddonResource) ShouldCleanup(tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubeadmAddonResource) ShouldStatusBeUpdated added in v0.1.0

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

func (*KubeadmAddonResource) UpdateTenantControlPlaneStatus added in v0.1.0

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

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(ctx context.Context, tenantControlPlane *kamajiv1alpha1.TenantControlPlane) error

type KubeadmPhase

type KubeadmPhase struct {
	Client client.Client
	Name   string
	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 (r *KubeadmPhase) GetKubeadmFunction() (func(clientset.Interface, *kubeadm.Configuration) error, error)

func (*KubeadmPhase) GetName added in v0.1.0

func (r *KubeadmPhase) GetName() string

func (*KubeadmPhase) GetStatus added in v0.1.0

func (*KubeadmPhase) GetTmpDirectory added in v0.1.0

func (r *KubeadmPhase) GetTmpDirectory() string

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 {
	KubeadmResource
	GetClient() client.Client
	GetKubeadmFunction() (func(clientset.Interface, *kubeadm.Configuration) error, error)
	GetStatus(*kamajiv1alpha1.TenantControlPlane) (kamajiv1alpha1.KubeadmConfigChecksumDependant, error)
	SetKubeadmConfigChecksum(string)
}

type KubeadmResource

type KubeadmResource interface {
	Resource
	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(ctx 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 (*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) HashValue added in v0.1.0

func (r *KubernetesDeploymentResource) HashValue(secret corev1.Secret) string

HashValue function returns the md5 value for the given secret.

func (*KubernetesDeploymentResource) SecretHashValue added in v0.1.0

func (r *KubernetesDeploymentResource) SecretHashValue(ctx context.Context, client client.Client, namespace, name string) (string, error)

SecretHashValue function returns the md5 value for the secret of the given name and namespace.

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 (r *KubernetesIngressResource) ShouldCleanup(tenantControlPlane *kamajiv1alpha1.TenantControlPlane) bool

func (*KubernetesIngressResource) ShouldStatusBeUpdated

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

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