Documentation
¶
Index ¶
- func Deploy(ctx context.Context, params *DeployParams) (*any, error)
- func GetProviders() map[string]cuexruntime.ProviderFn
- func GetTemplate() string
- type ApplicationParams
- type ApplicationVars
- type ClusterParams
- type ClusterReturns
- type DeployParameter
- type DeployParams
- type DeployWorkflowStepExecutor
- type Inputs
- type Outputs
- type PlacementDecisionParams
- type PlacementDecisionResult
- type PlacementDecisionReturns
- type PlacementDecisionVars
- type PoliciesParams
- type PoliciesResult
- type PoliciesReturns
- type PoliciesVars
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.
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
func NewDeployWorkflowStepExecutor(cli client.Client, af *appfile.Appfile, apply oamprovidertypes.ComponentApply, healthCheck oamprovidertypes.ComponentHealthCheck, renderer oamprovidertypes.WorkloadRender, parameter DeployParameter) DeployWorkflowStepExecutor
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