Documentation ¶
Index ¶
- Variables
- type DependentResourceWatchUpdater
- type KubedgeBaseManager
- func (m KubedgeBaseManager) BaseInstallResource(ctx context.Context) (*av1.SubResourceList, error)
- func (m KubedgeBaseManager) BaseReconcileResource(ctx context.Context) (*av1.SubResourceList, error)
- func (m KubedgeBaseManager) BaseRender(ctx context.Context) (*av1.SubResourceList, error)
- func (m KubedgeBaseManager) BaseSync(ctx context.Context) (*av1.SubResourceList, *av1.SubResourceList, error)
- func (m KubedgeBaseManager) BaseUninstallResource(ctx context.Context) (*av1.SubResourceList, error)
- func (m KubedgeBaseManager) BaseUpdateResource(ctx context.Context) (*av1.SubResourceList, *av1.SubResourceList, error)
- func (m KubedgeBaseManager) IsInstalled() bool
- func (m KubedgeBaseManager) IsUpdateRequired() bool
- func (m KubedgeBaseManager) ResourceName() string
- type KubedgeResourceManager
- type KubedgeResourceManagerFactory
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (m KubedgeBaseManager) BaseRender(ctx context.Context) (*av1.SubResourceList, error)
Render a chart or just a file
func (KubedgeBaseManager) BaseSync ¶
func (m KubedgeBaseManager) BaseSync(ctx context.Context) (*av1.SubResourceList, *av1.SubResourceList, error)
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 ¶
func (m KubedgeBaseManager) BaseUpdateResource(ctx context.Context) (*av1.SubResourceList, *av1.SubResourceList, error)
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.