policy

package
v1.12.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClusterLabelSelectorInTopology added in v1.3.0

func GetClusterLabelSelectorInTopology(topology *v1alpha1.TopologyPolicySpec) map[string]string

GetClusterLabelSelectorInTopology get cluster label selector in topology policy spec

func GetPlacementsFromTopologyPolicies added in v1.3.1

func GetPlacementsFromTopologyPolicies(ctx context.Context, cli client.Client, appNs string, policies []v1beta1.AppPolicy, allowCrossNamespace bool) ([]v1alpha1.PlacementDecision, error)

GetPlacementsFromTopologyPolicies get placements from topology policies with provided client

func ParseOverridePolicyRelatedDefinitions added in v1.3.0

func ParseOverridePolicyRelatedDefinitions(ctx context.Context, cli client.Client, _ *v1beta1.Application, policy v1beta1.AppPolicy) (compDefs []*v1beta1.ComponentDefinition, traitDefs []*v1beta1.TraitDefinition, err error)

ParseOverridePolicyRelatedDefinitions get definitions inside override policy

func ParsePolicy added in v1.7.0

func ParsePolicy[T any, P typer[T]](app *v1beta1.Application) (*T, error)

ParsePolicy parse policy for the given type

func ReplicateComponents added in v1.6.0

func ReplicateComponents(policies []v1beta1.AppPolicy, components []common.ApplicationComponent) ([]common.ApplicationComponent, error)

ReplicateComponents will filter the components to replicate, return the replication decisions

Types

This section is empty.

Directories

Path Synopsis
Package appscope holds what the controller and admission must agree on about the Application-scoped policies that apply to an Application: the order they run in, and whether it asks to skip the globals.
Package appscope holds what the controller and admission must agree on about the Application-scoped policies that apply to an Application: the order they run in, and whether it asks to skip the globals.
Package ctxschema reads what an Application-scoped policy declares about the context it supplies: the `schema: ctx` block of its template, which components and traits see as context.custom.
Package ctxschema reads what an Application-scoped policy declares about the context it supplies: the `schema: ctx` block of its template, which components and traits see as context.custom.
Package placement classifies objects as hub or runtime and builds the topology policies, override policies, and deploy steps that install each class.
Package placement classifies objects as hub or runtime and builds the topology policies, override policies, and deploy steps that install each class.

Jump to

Keyboard shortcuts

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