Documentation ¶
Index ¶
- Constants
- func ContextWithEnvName(ctx context.Context, envName string) context.Context
- func EnvNameInContext(ctx context.Context) string
- func GetEnvBindingPolicy(app *v1beta1.Application, policyName string) (*v1alpha1.EnvBindingSpec, error)
- func GetEnvBindingPolicyStatus(app *v1beta1.Application, policyName string) (*v1alpha1.EnvBindingStatus, error)
- func MergeComponent(base *common.ApplicationComponent, patch *v1alpha1.EnvComponentPatch) (*common.ApplicationComponent, error)
- func MergeRawExtension(base *runtime.RawExtension, patch *runtime.RawExtension) (*runtime.RawExtension, error)
- func PatchApplication(base *v1beta1.Application, patch *v1alpha1.EnvPatch, ...) (*v1beta1.Application, error)
- func PatchApplicationByEnvBindingEnv(app *v1beta1.Application, policyName string, envName string) (*v1beta1.Application, error)
- func PatchComponents(baseComponents []common.ApplicationComponent, ...) ([]common.ApplicationComponent, error)
- func ReadPlacementDecisions(app *v1beta1.Application, policyName string, envName string) ([]v1alpha1.PlacementDecision, bool, error)
- func WritePlacementDecisions(app *v1beta1.Application, policyName string, envName string, ...) error
Constants ¶
const ( // EnvNameContextKey is the name of env // Deprecated EnvNameContextKey = contextKey("EnvName") )
Variables ¶
This section is empty.
Functions ¶
func ContextWithEnvName ¶
ContextWithEnvName wraps context with envName Deprecated
func EnvNameInContext ¶
EnvNameInContext extract env name from context Deprecated
func GetEnvBindingPolicy ¶
func GetEnvBindingPolicy(app *v1beta1.Application, policyName string) (*v1alpha1.EnvBindingSpec, error)
GetEnvBindingPolicy extract env-binding policy with given policy name, if policy name is empty, the first env-binding policy will be used Deprecated
func GetEnvBindingPolicyStatus ¶
func GetEnvBindingPolicyStatus(app *v1beta1.Application, policyName string) (*v1alpha1.EnvBindingStatus, error)
GetEnvBindingPolicyStatus extract env-binding policy status with given policy name, if policy name is empty, the first env-binding policy will be used Deprecated
func MergeComponent ¶
func MergeComponent(base *common.ApplicationComponent, patch *v1alpha1.EnvComponentPatch) (*common.ApplicationComponent, error)
MergeComponent merge two component, it will first merge their properties and then merge their traits
func MergeRawExtension ¶
func MergeRawExtension(base *runtime.RawExtension, patch *runtime.RawExtension) (*runtime.RawExtension, error)
MergeRawExtension merge two raw extension
func PatchApplication ¶
func PatchApplication(base *v1beta1.Application, patch *v1alpha1.EnvPatch, selector *v1alpha1.EnvSelector) (*v1beta1.Application, error)
PatchApplication patch base application with patch and selector
func PatchApplicationByEnvBindingEnv ¶
func PatchApplicationByEnvBindingEnv(app *v1beta1.Application, policyName string, envName string) (*v1beta1.Application, error)
PatchApplicationByEnvBindingEnv get patched application directly through policyName and envName
func PatchComponents ¶ added in v1.3.0
func PatchComponents(baseComponents []common.ApplicationComponent, patchComponents []v1alpha1.EnvComponentPatch, selector []string) ([]common.ApplicationComponent, error)
PatchComponents patch base components with patch and selector
func ReadPlacementDecisions ¶
func ReadPlacementDecisions(app *v1beta1.Application, policyName string, envName string) ([]v1alpha1.PlacementDecision, bool, error)
ReadPlacementDecisions read placement decisions from application status, return (decisions, if decision is made, error) Deprecated As it is only used in EnvBinding policy
func WritePlacementDecisions ¶
func WritePlacementDecisions(app *v1beta1.Application, policyName string, envName string, decisions []v1alpha1.PlacementDecision) error
WritePlacementDecisions write placement decisions into application status Deprecated As it is only used in EnvBinding policy
Types ¶
This section is empty.