multicluster

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 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 added in v1.10.0

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

Deploy deploys the application

func GetProviders added in v1.10.0

func GetProviders() map[string]cuexruntime.ProviderFn

GetProviders returns the cue providers.

func GetTemplate added in v1.10.0

func GetTemplate() string

GetTemplate returns the cue template.

Types

type ApplicationParams added in v1.10.0

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

ApplicationParams is the parameter for patch application

type ApplicationVars added in v1.10.0

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

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

ClusterParams is the parameter for list clusters

type ClusterReturns added in v1.10.0

type ClusterReturns = oamprovidertypes.Returns[Outputs[ClusterParams]]

ClusterReturns is the return value for list clusters

func ListClusters added in v1.10.0

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

ListClusters lists clusters

type DeployParameter added in v1.7.0

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

type DeployParams = oamprovidertypes.Params[DeployParameter]

DeployParams is the parameter for deploy

type DeployWorkflowStepExecutor added in v1.4.0

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

DeployWorkflowStepExecutor executor to run deploy workflow step

func NewDeployWorkflowStepExecutor added in v1.4.0

NewDeployWorkflowStepExecutor .

type Inputs added in v1.10.0

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

Inputs is the inputs for multi cluster

type Outputs added in v1.10.0

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

Outputs is the outputs for multi cluster

type PlacementDecisionParams added in v1.10.0

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

PlacementDecisionParams is the parameter for make placement decisions

type PlacementDecisionResult added in v1.10.0

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

PlacementDecisionResult is the result for make placement decisions

type PlacementDecisionReturns added in v1.10.0

type PlacementDecisionReturns = Outputs[PlacementDecisionResult]

PlacementDecisionReturns is the return value for make placement decisions

type PlacementDecisionVars added in v1.10.0

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

type PoliciesParams = oamprovidertypes.Params[PoliciesVars]

PoliciesParams is the params for getting placements from topology policies

type PoliciesResult added in v1.10.0

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

PoliciesResult is the result for getting placements from topology policies

type PoliciesReturns added in v1.10.0

type PoliciesReturns = oamprovidertypes.Returns[PoliciesResult]

PoliciesReturns is the return value for getting placements from topology policies

func GetPlacementsFromTopologyPolicies added in v1.10.0

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

GetPlacementsFromTopologyPolicies gets placements from topology policies

type PoliciesVars added in v1.10.0

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
JackTT - Gopher 🇻🇳