envbinding

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OverrideNamespaceLabelKey identifies the override namespace for patched Application
	OverrideNamespaceLabelKey = "envbinding.oam.dev/override-namespace"
)

Variables

This section is empty.

Functions

func AssembleEnvBindApps

func AssembleEnvBindApps(envBindApps []*EnvBindApp) error

AssembleEnvBindApps assemble resource for EnvBindApp

func GarbageCollectionForAllResourceTrackersInSubCluster added in v1.1.1

func GarbageCollectionForAllResourceTrackersInSubCluster(ctx context.Context, c client.Client, envBinding *v1alpha1.EnvBinding) error

GarbageCollectionForAllResourceTrackersInSubCluster run garbage collection in sub clusters and remove all ResourceTrackers for the EnvBinding

func GarbageCollectionForOutdatedResourcesInSubClusters added in v1.1.1

func GarbageCollectionForOutdatedResourcesInSubClusters(ctx context.Context, c client.Client, policies []*unstructured.Unstructured, gcHandler func(context.Context) error) error

GarbageCollectionForOutdatedResourcesInSubClusters run garbage collection in sub clusters and remove outdated ResourceTrackers with their associated resources

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 SetOverrideNamespace added in v1.1.5

func SetOverrideNamespace(obj *unstructured.Unstructured, overrideNamespace string)

SetOverrideNamespace set the override namespace for object in its label

func Setup

func Setup(mgr ctrl.Manager, args oamctrl.Args) error

Setup adds a controller that reconciles EnvBinding.

func StoreManifest2ConfigMap

func StoreManifest2ConfigMap(ctx context.Context, cli client.Client, envBinding *v1alpha1.EnvBinding, apps []*EnvBindApp) error

StoreManifest2ConfigMap store manifest to configmap

Types

type ClusterGatewayEngine added in v1.1.1

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

ClusterGatewayEngine construct the multicluster engine of using cluster-gateway

type ClusterManagerEngine

type ClusterManagerEngine interface {
	// contains filtered or unexported methods
}

ClusterManagerEngine defines Cluster Manage interface

func NewClusterGatewayEngine added in v1.1.1

func NewClusterGatewayEngine(cli client.Client, envBindingName string) ClusterManagerEngine

NewClusterGatewayEngine create multicluster engine to use cluster-gateway

func NewOCMEngine

func NewOCMEngine(cli client.Client, appName, appNs, envBindingName string) ClusterManagerEngine

NewOCMEngine create Open-Cluster-Management ClusterManagerEngine

func NewSingleClusterEngine

func NewSingleClusterEngine(cli client.Client, appName, appNs, envBindingName string) ClusterManagerEngine

NewSingleClusterEngine create a single cluster ClusterManagerEngine

type EnvBindApp

type EnvBindApp struct {
	PatchedApp *v1beta1.Application

	ScheduledManifests 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) GenerateConfiguredApplication added in v1.1.1

func (e *EnvBindApp) GenerateConfiguredApplication() error

GenerateConfiguredApplication patch component parameters to base Application

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

type Reconciler

type Reconciler struct {
	client.Client

	Scheme *runtime.Scheme
	// contains filtered or unexported fields
}

Reconciler reconciles a EnvBinding object

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is the main logic for EnvBinding controller

func (*Reconciler) SetupWithManager

func (r *Reconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager will setup with event recorder

type SingleClusterEngine

type SingleClusterEngine struct {
	// contains filtered or unexported fields
}

SingleClusterEngine represents deploy resources to the local cluster

Jump to

Keyboard shortcuts

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