multicluster

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(ctx context.Context, params *DeployParams) (*any, error)

Deploy deploys the application

func GetProviders

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the cue providers.

func GetTemplate

func GetTemplate() string

GetTemplate returns the cue template.

Types

type ApplicationParams

type ApplicationParams = oamprovidertypes.OAMParams[Inputs[ApplicationVars]]

ApplicationParams is the parameter for patch application

type ApplicationVars

type ApplicationVars struct {
	EnvName  string                `json:"envName"`
	Patch    *v1alpha1.EnvPatch    `json:"patch,omitempty"`
	Selector *v1alpha1.EnvSelector `json:"selector,omitempty"`
}

ApplicationVars is the vars for patching application

type ClusterParams

type ClusterParams struct {
	Clusters []string `json:"clusters"`
}

ClusterParams is the parameter for list clusters

type ClusterReturns

type ClusterReturns = Outputs[ClusterParams]

ClusterReturns is the return value for list clusters

func ListClusters

func ListClusters(ctx context.Context, params *oamprovidertypes.OAMParams[any]) (*ClusterReturns, error)

ListClusters lists clusters

type DeployParameter

type DeployParameter struct {
	// Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster.
	Policies []string `json:"policies,omitempty"`
	// Maximum number of concurrent delivered components.
	Parallelism int64 `json:"parallelism"`
	// If set false, this step will apply the components with the terraform workload.
	IgnoreTerraformComponent bool `json:"ignoreTerraformComponent"`
	// The policies that embeds in the `deploy` step directly
	InlinePolicies []v1beta1.AppPolicy `json:"inlinePolicies,omitempty"`
}

DeployParameter is the parameter of deploy workflow step

type DeployParams

DeployParams is the parameter for deploy

type DeployWorkflowStepExecutor

type DeployWorkflowStepExecutor interface {
	Deploy(ctx context.Context) (healthy bool, reason string, err error)
}

DeployWorkflowStepExecutor executor to run deploy workflow step

func NewDeployWorkflowStepExecutor

NewDeployWorkflowStepExecutor .

type Inputs

type Inputs[T any] struct {
	Inputs T `json:"inputs"`
}

Inputs is the inputs for multi cluster

type Outputs

type Outputs[T any] struct {
	Outputs T `json:"outputs"`
}

Outputs is the outputs for multi cluster

func PatchApplication

func PatchApplication(_ context.Context, params *ApplicationParams) (*Outputs[*v1beta1.Application], error)

PatchApplication ... Deprecated

type PlacementDecisionParams

type PlacementDecisionParams = oamprovidertypes.OAMParams[Inputs[PlacementDecisionVars]]

PlacementDecisionParams is the parameter for make placement decisions

type PlacementDecisionResult

type PlacementDecisionResult struct {
	Decisions []v1alpha1.PlacementDecision `json:"decisions"`
}

PlacementDecisionResult is the result for make placement decisions

type PlacementDecisionReturns

type PlacementDecisionReturns = Outputs[PlacementDecisionResult]

PlacementDecisionReturns is the return value for make placement decisions

func MakePlacementDecisions

func MakePlacementDecisions(ctx context.Context, params *PlacementDecisionParams) (*PlacementDecisionReturns, error)

MakePlacementDecisions ... Deprecated

type PlacementDecisionVars

type PlacementDecisionVars struct {
	PolicyName string                 `json:"policyName"`
	EnvName    string                 `json:"envName"`
	Placement  *v1alpha1.EnvPlacement `json:"placement,omitempty"`
}

PlacementDecisionVars is the vars for make placement decisions

type PoliciesParams

type PoliciesParams = oamprovidertypes.OAMParams[PoliciesVars]

PoliciesParams is the params for getting placements from topology policies

type PoliciesResult

type PoliciesResult struct {
	Placements []v1alpha1.PlacementDecision `json:"placements"`
}

PoliciesResult is the result for getting placements from topology policies

func GetPlacementsFromTopologyPolicies

func GetPlacementsFromTopologyPolicies(ctx context.Context, params *PoliciesParams) (*PoliciesResult, error)

GetPlacementsFromTopologyPolicies gets placements from topology policies

type PoliciesVars

type PoliciesVars struct {
	Policies []string `json:"policies"`
}

PoliciesVars is the vars for getting placements from topology policies

Jump to

Keyboard shortcuts

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