Documentation ¶
Index ¶
- func AssembleEnvBindApps(envBindApps []*EnvBindApp) error
- func PatchComponent(baseComponent *common.ApplicationComponent, ...) (*common.ApplicationComponent, error)
- func PatchProperties(dst runtime.RawExtension, patch runtime.RawExtension) (map[string]interface{}, error)
- func RenderEnvBindApps(ctx context.Context, envBindApps []*EnvBindApp, appParser *appfile.Parser) error
- func Setup(mgr ctrl.Manager, args oamctrl.Args) error
- func StoreManifest2ConfigMap(ctx context.Context, cli client.Client, envBinding *v1alpha1.EnvBinding, ...) error
- type ClusterManagerEngine
- type EnvBindApp
- type OCMEngine
- func (o *OCMEngine) DispatchPlacement(ctx context.Context, config v1alpha1.EnvConfig) error
- func (o *OCMEngine) GetClusterDecisions() []v1alpha1.ClusterDecision
- func (o *OCMEngine) GetSelectedCluster(ctx context.Context, name, namespace string) (string, error)
- func (o *OCMEngine) Prepare(ctx context.Context, configs []v1alpha1.EnvConfig) error
- func (o *OCMEngine) Schedule(ctx context.Context, apps []*EnvBindApp) error
- type Reconciler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssembleEnvBindApps ¶
func AssembleEnvBindApps(envBindApps []*EnvBindApp) error
AssembleEnvBindApps assemble resource for EnvBindApp
func PatchComponent ¶
func PatchComponent(baseComponent *common.ApplicationComponent, patchComponent *common.ApplicationComponent) (*common.ApplicationComponent, error)
PatchComponent patch component parameter to target component parameter
func PatchProperties ¶
func PatchProperties(dst runtime.RawExtension, patch runtime.RawExtension) (map[string]interface{}, error)
PatchProperties merge patch parameter for dst parameter
func RenderEnvBindApps ¶
func RenderEnvBindApps(ctx context.Context, envBindApps []*EnvBindApp, appParser *appfile.Parser) error
RenderEnvBindApps render EnvBindApps
func StoreManifest2ConfigMap ¶
func StoreManifest2ConfigMap(ctx context.Context, cli client.Client, envBinding *v1alpha1.EnvBinding, apps []*EnvBindApp) error
StoreManifest2ConfigMap store manifest to configmap
Types ¶
type ClusterManagerEngine ¶
type ClusterManagerEngine interface { Prepare(ctx context.Context, configs []v1alpha1.EnvConfig) error Schedule(ctx context.Context, apps []*EnvBindApp) error GetClusterDecisions() []v1alpha1.ClusterDecision }
ClusterManagerEngine defines Cluster Manage interface
func NewOCMEngine ¶
func NewOCMEngine(cli client.Client, appName, appNs string) ClusterManagerEngine
NewOCMEngine create Open-Cluster-Management ClusterManagerEngine
type EnvBindApp ¶
type EnvBindApp struct { ManifestWork map[string]*unstructured.Unstructured // contains filtered or unexported fields }
EnvBindApp describes the app bound to the environment
func CreateEnvBindApps ¶
func CreateEnvBindApps(envBinding *v1alpha1.EnvBinding, baseApp *v1beta1.Application) ([]*EnvBindApp, error)
CreateEnvBindApps create EnvBindApps from different envs
func NewEnvBindApp ¶
func NewEnvBindApp(base *v1beta1.Application, envConfig *v1alpha1.EnvConfig) *EnvBindApp
NewEnvBindApp create EnvBindApp
func (*EnvBindApp) SetNamespace ¶
func (e *EnvBindApp) SetNamespace(resource *unstructured.Unstructured)
SetNamespace set namespace for *unstructured.Unstructured
func (*EnvBindApp) SetTraitName ¶
func (e *EnvBindApp) SetTraitName(compName string, trait *unstructured.Unstructured)
SetTraitName set name for Trait
type OCMEngine ¶
type OCMEngine struct {
// contains filtered or unexported fields
}
OCMEngine represents Open-Cluster-Management multi-cluster management solution
func (*OCMEngine) DispatchPlacement ¶
DispatchPlacement dispatch Placement Object of OCM for cluster selected
func (*OCMEngine) GetClusterDecisions ¶
func (o *OCMEngine) GetClusterDecisions() []v1alpha1.ClusterDecision
GetClusterDecisions return ClusterDecisions
func (*OCMEngine) GetSelectedCluster ¶
GetSelectedCluster get selected cluster from PlacementDecision
type Reconciler ¶
type Reconciler struct { client.Client Scheme *runtime.Scheme // contains filtered or unexported fields }
Reconciler reconciles a EnvBinding object
func (*Reconciler) SetupWithManager ¶
func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager will setup with event recorder