basemanager

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 15 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound indicates the resource was not found.
	ErrNotFound = errors.New("Resource not found")
)

Functions

This section is empty.

Types

type DependentResourceWatchUpdater

type DependentResourceWatchUpdater func([]unstructured.Unstructured) error

func BuildDependentResourceWatchUpdater

func BuildDependentResourceWatchUpdater(mgr manager.Manager, owner *unstructured.Unstructured,
	c controller.Controller, dependentPredicate crtpredicate.Funcs) DependentResourceWatchUpdater

BuildDependentResourcesWatchUpdater builds a function that adds watches for resources in released Helm charts.

type KubedgeBaseManager

type KubedgeBaseManager struct {
	KubeClient     client.Client
	Renderer       *OwnerRefRenderer
	PhaseName      string
	PhaseNamespace string
	Source         *av1.KubedgeSource

	IsInstalledFlag         bool
	IsUpdateRequiredFlag    bool
	DeployedSubResourceList *av1.SubResourceList
}

Default implementation of KubedgeResourceManager

func (KubedgeBaseManager) BaseInstallResource

func (m KubedgeBaseManager) BaseInstallResource(ctx context.Context) (*av1.SubResourceList, error)

InstallResource creates K8s sub resources (Workflow, Job, ....) attached to this Phase CR

func (KubedgeBaseManager) BaseReconcileResource

func (m KubedgeBaseManager) BaseReconcileResource(ctx context.Context) (*av1.SubResourceList, error)

ReconcileResource creates or patches resources as necessary to match this Phase CR

func (KubedgeBaseManager) BaseRender

Render a chart or just a file

func (KubedgeBaseManager) BaseSync

Attempts to compare the K8s object present with the rendered objects

func (KubedgeBaseManager) BaseUninstallResource

func (m KubedgeBaseManager) BaseUninstallResource(ctx context.Context) (*av1.SubResourceList, error)

UninstallResource delete K8s sub resources (Workflow, Job, ....) attached to this Phase CR

func (KubedgeBaseManager) BaseUpdateResource

InstallResource updates K8s sub resources (Workflow, Job, ....) attached to this Phase CR

func (KubedgeBaseManager) IsInstalled

func (m KubedgeBaseManager) IsInstalled() bool

func (KubedgeBaseManager) IsUpdateRequired

func (m KubedgeBaseManager) IsUpdateRequired() bool

func (KubedgeBaseManager) ResourceName

func (m KubedgeBaseManager) ResourceName() string

ResourceName returns the name of the release.

type KubedgeResourceManager

type KubedgeResourceManager interface {
	ResourceName() string
	IsInstalled() bool
	IsUpdateRequired() bool
	Sync(context.Context) error
	InstallResource(context.Context) (*av1.SubResourceList, error)
	UpdateResource(context.Context) (*av1.SubResourceList, *av1.SubResourceList, error)
	ReconcileResource(context.Context) (*av1.SubResourceList, error)
	UninstallResource(context.Context) (*av1.SubResourceList, error)
}

KubedgeResourceManager

type KubedgeResourceManagerFactory

type KubedgeResourceManagerFactory interface {
	NewArpscanManager(r *av1.Arpscan) KubedgeResourceManager
	NewECDSClusterManager(r *av1.ECDSCluster) KubedgeResourceManager
	NewMMESimManager(r *av1.MMESim) KubedgeResourceManager
}

ManagerFactory creates Managers that are specific to custom resources.

func NewManagerFactory

func NewManagerFactory(mgr manager.Manager) KubedgeResourceManagerFactory

NewManagerFactory returns a new factory.

Jump to

Keyboard shortcuts

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