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 PoliciesVars
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.
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 ¶
type DeployParams = oamprovidertypes.OAMParams[DeployParameter]
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 ¶
func NewDeployWorkflowStepExecutor(cli client.Client, af *appfile.Appfile, apply oamprovidertypes.ComponentApply, healthCheck oamprovidertypes.ComponentHealthCheck, renderer oamprovidertypes.WorkloadRender, parameter DeployParameter) DeployWorkflowStepExecutor
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