garbage_collect

package
v0.0.0-...-3d8ba93 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GarbageCollectType = "garbage-collect"

Variables

This section is empty.

Functions

func FromPolicy

func FromPolicy(from v1beta1.AppPolicy) (apis.Policy, error)

Types

type GarbageCollectPolicy

type GarbageCollectPolicy struct {
	Base       apis.PolicyBase
	Properties GarbageCollectSpec
}

func GarbageCollect

func GarbageCollect(name string) *GarbageCollectPolicy

func (*GarbageCollectPolicy) Build

func (*GarbageCollectPolicy) DefType

func (g *GarbageCollectPolicy) DefType() string

func (*GarbageCollectPolicy) FromPolicy

func (*GarbageCollectPolicy) GetApplicationRevisionLimit

func (o *GarbageCollectPolicy) GetApplicationRevisionLimit() int32

GetApplicationRevisionLimit returns the ApplicationRevisionLimit field value if set, zero value otherwise.

func (*GarbageCollectPolicy) GetApplicationRevisionLimitOk

func (o *GarbageCollectPolicy) GetApplicationRevisionLimitOk() (*int32, bool)

GetApplicationRevisionLimitOk returns a tuple with the ApplicationRevisionLimit field value if set, nil otherwise and a boolean to check if the value has been set.

func (*GarbageCollectPolicy) GetContinueOnFailure

func (o *GarbageCollectPolicy) GetContinueOnFailure() bool

GetContinueOnFailure returns the ContinueOnFailure field value

func (*GarbageCollectPolicy) GetContinueOnFailureOk

func (o *GarbageCollectPolicy) GetContinueOnFailureOk() (*bool, bool)

GetContinueOnFailureOk returns a tuple with the ContinueOnFailure field value and a boolean to check if the value has been set.

func (*GarbageCollectPolicy) GetKeepLegacyResource

func (o *GarbageCollectPolicy) GetKeepLegacyResource() bool

GetKeepLegacyResource returns the KeepLegacyResource field value

func (*GarbageCollectPolicy) GetKeepLegacyResourceOk

func (o *GarbageCollectPolicy) GetKeepLegacyResourceOk() (*bool, bool)

GetKeepLegacyResourceOk returns a tuple with the KeepLegacyResource field value and a boolean to check if the value has been set.

func (*GarbageCollectPolicy) GetRules

GetRules returns the Rules field value if set, zero value otherwise.

func (*GarbageCollectPolicy) GetRulesOk

func (o *GarbageCollectPolicy) GetRulesOk() ([]GarbageCollectPolicyRule, bool)

GetRulesOk returns a tuple with the Rules field value if set, nil otherwise and a boolean to check if the value has been set.

func (*GarbageCollectPolicy) HasApplicationRevisionLimit

func (o *GarbageCollectPolicy) HasApplicationRevisionLimit() bool

HasApplicationRevisionLimit returns a boolean if a field has been set.

func (*GarbageCollectPolicy) HasRules

func (o *GarbageCollectPolicy) HasRules() bool

HasRules returns a boolean if a field has been set.

func (*GarbageCollectPolicy) PolicyName

func (g *GarbageCollectPolicy) PolicyName() string

func (*GarbageCollectPolicy) SetApplicationRevisionLimit

func (o *GarbageCollectPolicy) SetApplicationRevisionLimit(v int32) *GarbageCollectPolicy

SetApplicationRevisionLimit gets a reference to the given int32 and assigns it to the applicationRevisionLimit field. ApplicationRevisionLimit: If set, it will override the default revision limit number and customize this number for the current application

func (*GarbageCollectPolicy) SetContinueOnFailure

func (o *GarbageCollectPolicy) SetContinueOnFailure(v bool) *GarbageCollectPolicy

SetContinueOnFailure sets field value

func (*GarbageCollectPolicy) SetKeepLegacyResource

func (o *GarbageCollectPolicy) SetKeepLegacyResource(v bool) *GarbageCollectPolicy

SetKeepLegacyResource sets field value

func (*GarbageCollectPolicy) SetRules

SetRules gets a reference to the given []GarbageCollectPolicyRule and assigns it to the rules field. Rules: Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used

func (*GarbageCollectPolicy) Validate

func (o *GarbageCollectPolicy) Validate() error

Validate validates this GarbageCollectSpec 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type GarbageCollectPolicyRule

type GarbageCollectPolicyRule struct {
	// Specify the deletion propagation strategy for target resource to delete
	Propagation *string                     `json:"propagation,omitempty"`
	Selector    *ResourcePolicyRuleSelector `json:"selector"`
	// Specify the strategy for target resource to recycle
	Strategy *string `json:"strategy"`
}

GarbageCollectPolicyRule struct for GarbageCollectPolicyRule

func NewGarbageCollectPolicyRule

func NewGarbageCollectPolicyRule() *GarbageCollectPolicyRule

NewGarbageCollectPolicyRule is short for NewGarbageCollectPolicyRuleWithDefault which instantiates a new GarbageCollectPolicyRule object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewGarbageCollectPolicyRuleEmpty

func NewGarbageCollectPolicyRuleEmpty() *GarbageCollectPolicyRule

NewGarbageCollectPolicyRuleEmpty instantiates a new GarbageCollectPolicyRule object with no properties set. This constructor will not assign any default values to properties.

func NewGarbageCollectPolicyRuleList

func NewGarbageCollectPolicyRuleList(ps ...*GarbageCollectPolicyRule) []GarbageCollectPolicyRule

NewGarbageCollectPolicyRules converts a list GarbageCollectPolicyRule pointers to objects. This is helpful when the SetGarbageCollectPolicyRule requires a list of objects

func NewGarbageCollectPolicyRuleWith

func NewGarbageCollectPolicyRuleWith(selector ResourcePolicyRuleSelector, strategy string) *GarbageCollectPolicyRule

NewGarbageCollectPolicyRuleWith instantiates a new GarbageCollectPolicyRule object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewGarbageCollectPolicyRuleWithDefault

func NewGarbageCollectPolicyRuleWithDefault() *GarbageCollectPolicyRule

NewGarbageCollectPolicyRuleWithDefault instantiates a new GarbageCollectPolicyRule object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*GarbageCollectPolicyRule) GetPropagation

func (o *GarbageCollectPolicyRule) GetPropagation() string

GetPropagation returns the Propagation field value if set, zero value otherwise.

func (*GarbageCollectPolicyRule) GetPropagationOk

func (o *GarbageCollectPolicyRule) GetPropagationOk() (*string, bool)

GetPropagationOk returns a tuple with the Propagation field value if set, nil otherwise and a boolean to check if the value has been set.

func (*GarbageCollectPolicyRule) GetSelector

GetSelector returns the Selector field value

func (*GarbageCollectPolicyRule) GetSelectorOk

GetSelectorOk returns a tuple with the Selector field value and a boolean to check if the value has been set.

func (*GarbageCollectPolicyRule) GetStrategy

func (o *GarbageCollectPolicyRule) GetStrategy() string

GetStrategy returns the Strategy field value

func (*GarbageCollectPolicyRule) GetStrategyOk

func (o *GarbageCollectPolicyRule) GetStrategyOk() (*string, bool)

GetStrategyOk returns a tuple with the Strategy field value and a boolean to check if the value has been set.

func (*GarbageCollectPolicyRule) HasPropagation

func (o *GarbageCollectPolicyRule) HasPropagation() bool

HasPropagation returns a boolean if a field has been set.

func (GarbageCollectPolicyRule) MarshalJSON

func (o GarbageCollectPolicyRule) MarshalJSON() ([]byte, error)

func (*GarbageCollectPolicyRule) SetPropagation

SetPropagation gets a reference to the given string and assigns it to the propagation field. Propagation: Specify the deletion propagation strategy for target resource to delete

func (*GarbageCollectPolicyRule) SetSelector

SetSelector sets field value

func (*GarbageCollectPolicyRule) SetStrategy

SetStrategy sets field value

func (GarbageCollectPolicyRule) ToMap

func (o GarbageCollectPolicyRule) ToMap() (map[string]interface{}, error)

func (*GarbageCollectPolicyRule) Validate

func (o *GarbageCollectPolicyRule) Validate() error

Validate validates this GarbageCollectPolicyRule 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

type GarbageCollectSpec

type GarbageCollectSpec struct {
	// If set, it will override the default revision limit number and customize this number for the current application
	ApplicationRevisionLimit *int32 `json:"applicationRevisionLimit,omitempty"`
	// If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
	ContinueOnFailure *bool `json:"continueOnFailure"`
	// If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually
	KeepLegacyResource *bool `json:"keepLegacyResource"`
	// Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used
	Rules []GarbageCollectPolicyRule `json:"rules,omitempty"`
}

GarbageCollectSpec struct for GarbageCollectSpec

func NewGarbageCollectSpec

func NewGarbageCollectSpec() *GarbageCollectSpec

NewGarbageCollectSpec is short for NewGarbageCollectSpecWithDefault which instantiates a new GarbageCollectSpec object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewGarbageCollectSpecEmpty

func NewGarbageCollectSpecEmpty() *GarbageCollectSpec

NewGarbageCollectSpecEmpty instantiates a new GarbageCollectSpec object with no properties set. This constructor will not assign any default values to properties.

func NewGarbageCollectSpecList

func NewGarbageCollectSpecList(ps ...*GarbageCollectSpec) []GarbageCollectSpec

NewGarbageCollectSpecs converts a list GarbageCollectSpec pointers to objects. This is helpful when the SetGarbageCollectSpec requires a list of objects

func NewGarbageCollectSpecWith

func NewGarbageCollectSpecWith(continueOnFailure bool, keepLegacyResource bool) *GarbageCollectSpec

NewGarbageCollectSpecWith instantiates a new GarbageCollectSpec object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewGarbageCollectSpecWithDefault

func NewGarbageCollectSpecWithDefault() *GarbageCollectSpec

NewGarbageCollectSpecWithDefault instantiates a new GarbageCollectSpec object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (GarbageCollectSpec) MarshalJSON

func (o GarbageCollectSpec) MarshalJSON() ([]byte, error)

func (GarbageCollectSpec) ToMap

func (o GarbageCollectSpec) ToMap() (map[string]interface{}, error)

type NullableGarbageCollectPolicyRule

type NullableGarbageCollectPolicyRule struct {
	// contains filtered or unexported fields
}

func (*NullableGarbageCollectPolicyRule) Get

func (*NullableGarbageCollectPolicyRule) IsSet

func (NullableGarbageCollectPolicyRule) MarshalJSON

func (v NullableGarbageCollectPolicyRule) MarshalJSON() ([]byte, error)

func (*NullableGarbageCollectPolicyRule) Set

func (*NullableGarbageCollectPolicyRule) UnmarshalJSON

func (v *NullableGarbageCollectPolicyRule) UnmarshalJSON(src []byte) error

func (*NullableGarbageCollectPolicyRule) Unset

type NullableGarbageCollectSpec

type NullableGarbageCollectSpec struct {
	// contains filtered or unexported fields
}

func NewNullableGarbageCollectSpec

func NewNullableGarbageCollectSpec(val *GarbageCollectSpec) *NullableGarbageCollectSpec

func (*NullableGarbageCollectSpec) Get

func (*NullableGarbageCollectSpec) IsSet

func (v *NullableGarbageCollectSpec) IsSet() bool

func (NullableGarbageCollectSpec) MarshalJSON

func (v NullableGarbageCollectSpec) MarshalJSON() ([]byte, error)

func (*NullableGarbageCollectSpec) Set

func (*NullableGarbageCollectSpec) UnmarshalJSON

func (v *NullableGarbageCollectSpec) UnmarshalJSON(src []byte) error

func (*NullableGarbageCollectSpec) Unset

func (v *NullableGarbageCollectSpec) Unset()

type NullableResourcePolicyRuleSelector

type NullableResourcePolicyRuleSelector struct {
	// contains filtered or unexported fields
}

func (*NullableResourcePolicyRuleSelector) Get

func (*NullableResourcePolicyRuleSelector) IsSet

func (NullableResourcePolicyRuleSelector) MarshalJSON

func (v NullableResourcePolicyRuleSelector) MarshalJSON() ([]byte, error)

func (*NullableResourcePolicyRuleSelector) Set

func (*NullableResourcePolicyRuleSelector) UnmarshalJSON

func (v *NullableResourcePolicyRuleSelector) UnmarshalJSON(src []byte) error

func (*NullableResourcePolicyRuleSelector) Unset

type ResourcePolicyRuleSelector

type ResourcePolicyRuleSelector struct {
	// Select resources by component names
	ComponentNames []string `json:"componentNames,omitempty"`
	// Select resources by component types
	ComponentTypes []string `json:"componentTypes,omitempty"`
	// Select resources by oamTypes (COMPONENT or TRAIT)
	OamTypes []string `json:"oamTypes,omitempty"`
	// Select resources by their names
	ResourceNames []string `json:"resourceNames,omitempty"`
	// Select resources by resource types (like Deployment)
	ResourceTypes []string `json:"resourceTypes,omitempty"`
	// Select resources by trait types
	TraitTypes []string `json:"traitTypes,omitempty"`
}

ResourcePolicyRuleSelector struct for ResourcePolicyRuleSelector

func NewResourcePolicyRuleSelector

func NewResourcePolicyRuleSelector() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelector is short for NewResourcePolicyRuleSelectorWithDefault which instantiates a new ResourcePolicyRuleSelector object. This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func NewResourcePolicyRuleSelectorEmpty

func NewResourcePolicyRuleSelectorEmpty() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectorEmpty instantiates a new ResourcePolicyRuleSelector object with no properties set. This constructor will not assign any default values to properties.

func NewResourcePolicyRuleSelectorList

func NewResourcePolicyRuleSelectorList(ps ...*ResourcePolicyRuleSelector) []ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectors converts a list ResourcePolicyRuleSelector pointers to objects. This is helpful when the SetResourcePolicyRuleSelector requires a list of objects

func NewResourcePolicyRuleSelectorWith

func NewResourcePolicyRuleSelectorWith() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectorWith instantiates a new ResourcePolicyRuleSelector object This constructor will make sure properties required by API are set. For optional properties, it will set default values if they have been defined. The set of arguments will change when the set of required properties is changed

func NewResourcePolicyRuleSelectorWithDefault

func NewResourcePolicyRuleSelectorWithDefault() *ResourcePolicyRuleSelector

NewResourcePolicyRuleSelectorWithDefault instantiates a new ResourcePolicyRuleSelector object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set

func (*ResourcePolicyRuleSelector) GetComponentNames

func (o *ResourcePolicyRuleSelector) GetComponentNames() []string

GetComponentNames returns the ComponentNames field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetComponentNamesOk

func (o *ResourcePolicyRuleSelector) GetComponentNamesOk() ([]string, bool)

GetComponentNamesOk returns a tuple with the ComponentNames field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) GetComponentTypes

func (o *ResourcePolicyRuleSelector) GetComponentTypes() []string

GetComponentTypes returns the ComponentTypes field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetComponentTypesOk

func (o *ResourcePolicyRuleSelector) GetComponentTypesOk() ([]string, bool)

GetComponentTypesOk returns a tuple with the ComponentTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) GetOamTypes

func (o *ResourcePolicyRuleSelector) GetOamTypes() []string

GetOamTypes returns the OamTypes field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetOamTypesOk

func (o *ResourcePolicyRuleSelector) GetOamTypesOk() ([]string, bool)

GetOamTypesOk returns a tuple with the OamTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) GetResourceNames

func (o *ResourcePolicyRuleSelector) GetResourceNames() []string

GetResourceNames returns the ResourceNames field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetResourceNamesOk

func (o *ResourcePolicyRuleSelector) GetResourceNamesOk() ([]string, bool)

GetResourceNamesOk returns a tuple with the ResourceNames field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) GetResourceTypes

func (o *ResourcePolicyRuleSelector) GetResourceTypes() []string

GetResourceTypes returns the ResourceTypes field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetResourceTypesOk

func (o *ResourcePolicyRuleSelector) GetResourceTypesOk() ([]string, bool)

GetResourceTypesOk returns a tuple with the ResourceTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) GetTraitTypes

func (o *ResourcePolicyRuleSelector) GetTraitTypes() []string

GetTraitTypes returns the TraitTypes field value if set, zero value otherwise.

func (*ResourcePolicyRuleSelector) GetTraitTypesOk

func (o *ResourcePolicyRuleSelector) GetTraitTypesOk() ([]string, bool)

GetTraitTypesOk returns a tuple with the TraitTypes field value if set, nil otherwise and a boolean to check if the value has been set.

func (*ResourcePolicyRuleSelector) HasComponentNames

func (o *ResourcePolicyRuleSelector) HasComponentNames() bool

HasComponentNames returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasComponentTypes

func (o *ResourcePolicyRuleSelector) HasComponentTypes() bool

HasComponentTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasOamTypes

func (o *ResourcePolicyRuleSelector) HasOamTypes() bool

HasOamTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasResourceNames

func (o *ResourcePolicyRuleSelector) HasResourceNames() bool

HasResourceNames returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasResourceTypes

func (o *ResourcePolicyRuleSelector) HasResourceTypes() bool

HasResourceTypes returns a boolean if a field has been set.

func (*ResourcePolicyRuleSelector) HasTraitTypes

func (o *ResourcePolicyRuleSelector) HasTraitTypes() bool

HasTraitTypes returns a boolean if a field has been set.

func (ResourcePolicyRuleSelector) MarshalJSON

func (o ResourcePolicyRuleSelector) MarshalJSON() ([]byte, error)

func (*ResourcePolicyRuleSelector) SetComponentNames

SetComponentNames gets a reference to the given []string and assigns it to the componentNames field. ComponentNames: Select resources by component names

func (*ResourcePolicyRuleSelector) SetComponentTypes

SetComponentTypes gets a reference to the given []string and assigns it to the componentTypes field. ComponentTypes: Select resources by component types

func (*ResourcePolicyRuleSelector) SetOamTypes

SetOamTypes gets a reference to the given []string and assigns it to the oamTypes field. OamTypes: Select resources by oamTypes (COMPONENT or TRAIT)

func (*ResourcePolicyRuleSelector) SetResourceNames

SetResourceNames gets a reference to the given []string and assigns it to the resourceNames field. ResourceNames: Select resources by their names

func (*ResourcePolicyRuleSelector) SetResourceTypes

SetResourceTypes gets a reference to the given []string and assigns it to the resourceTypes field. ResourceTypes: Select resources by resource types (like Deployment)

func (*ResourcePolicyRuleSelector) SetTraitTypes

SetTraitTypes gets a reference to the given []string and assigns it to the traitTypes field. TraitTypes: Select resources by trait types

func (ResourcePolicyRuleSelector) ToMap

func (o ResourcePolicyRuleSelector) ToMap() (map[string]interface{}, error)

func (*ResourcePolicyRuleSelector) Validate

func (o *ResourcePolicyRuleSelector) Validate() error

Validate validates this ResourcePolicyRuleSelector 1. If the required properties are not set, this will return an error 2. If properties are set, will check if nested required properties are set

Jump to

Keyboard shortcuts

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