Documentation ¶
Index ¶
Constants ¶
View Source
const ( // CommandString command string CommandString = "command" // ArgsString args string ArgsString = "args" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppliedOverrides ¶ added in v0.5.0
type AppliedOverrides struct { // AppliedItems is the list of applied overriders. AppliedItems []OverridePolicyShadow `json:"appliedItems,omitempty"` }
AppliedOverrides is the list of applied overriders.
func (*AppliedOverrides) Add ¶ added in v0.5.0
func (ao *AppliedOverrides) Add(policyName string, overriders policyv1alpha1.Overriders)
Add appends an item to AppliedItems.
func (*AppliedOverrides) AscendOrder ¶ added in v0.5.0
func (ao *AppliedOverrides) AscendOrder()
AscendOrder sort the applied items in ascending order.
func (*AppliedOverrides) MarshalJSON ¶ added in v0.5.0
func (ao *AppliedOverrides) MarshalJSON() ([]byte, error)
MarshalJSON returns the JSON encoding of applied overrides.
type GeneralOverridePolicy ¶ added in v1.0.0
type GeneralOverridePolicy interface { // GetName returns the name of OverridePolicy GetName() string // GetNamespace returns the namespace of OverridePolicy GetNamespace() string // GetOverrideSpec returns the OverrideSpec of OverridePolicy GetOverrideSpec() policyv1alpha1.OverrideSpec }
GeneralOverridePolicy is an abstract object of ClusterOverridePolicy and OverridePolicy
type OverrideManager ¶
type OverrideManager interface { // ApplyOverridePolicies overrides the object if one or more override policies exist and matches the target cluster. // For cluster scoped resource: // - Apply ClusterOverridePolicy by policies name in ascending // For namespaced scoped resource, apply order is: // - First apply ClusterOverridePolicy; // - Then apply OverridePolicy; ApplyOverridePolicies(rawObj *unstructured.Unstructured, cluster string) (appliedClusterPolicies *AppliedOverrides, appliedNamespacedPolicies *AppliedOverrides, err error) }
OverrideManager managers override policies operation
type OverridePolicyShadow ¶ added in v0.5.0
type OverridePolicyShadow struct { // PolicyName is the name of the referencing policy. PolicyName string `json:"policyName"` // Overriders is the overrider list of the referencing policy. Overriders policyv1alpha1.Overriders `json:"overriders"` }
OverridePolicyShadow is the condensed version of a OverridePolicy or ClusterOverridePolicy.
Click to show internal directories.
Click to hide internal directories.