Version: v1.3
Built-in Policy Type
This documentation will walk through the built-in policies.
#
apply-onceOverview
Allow configuration drift for applied resources.
Parameter
Name | Type | Description |
---|---|---|
enable | bool | If true, allow configuration drift. |
Example
#
garbage-collectOverview
Configure the garbage collection behaviour for the application.
Parameter
Name | Type | Description |
---|---|---|
keepLegacyResource | bool | If true, outdated versioned resourcetracker will not be recycled automatically. Outdated resources will be kept until resourcetracker be deleted manually. |
rules | []GarbageCollectPolicyRule | A list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used. |
GarbageCollectPolicyRule
Name | Type | Description |
---|---|---|
selector | GarbageCollectPolicyRuleSelector | Select the target resources of the rule. |
strategy | String | The strategy for target resources to recycle. Available values: never, onAppDelete, onAppUpdate. |
GarbageCollectPolicyRuleSelector
Name | Type | Description |
---|---|---|
componentNames | []String | Select target resources by component names. |
componentTypes | []String | Select target resources by component types. |
traitTypes | []String | Select target resources by trait types. |
Example
#
OverrideOverview
Describe the configuration to override when deploying resources.
Parameter
Name | Type | Description |
---|---|---|
components | []ComponentPatch | A list of component configurations to override. |
selector | []String | A list of component names to use. If not set, all components will be used. |
ComponentPatch
Name | Type | Description |
---|---|---|
name | string | The name of the component to override. If not set, it will match all components with the specified type. Can be used with wildcard * for fuzzy match. |
type | String | The type of the component to override. If not set, all component types will be matched. |
properties | Object | The component properties to merge. |
traits | []TraitPatch | A list of trait configurations to override. |
TraitPatch
Name | Type | Description |
---|---|---|
type | String | The type of the trait to override. |
properties | Object | The trait properties to merge. |
disable | bool | If true, this trait will be removed. |
Examples
#
topologyOverview
Describe the destination where components should be deployed to.
Parameter
Name | Type | Description |
---|---|---|
clusters | []string | The names of the clusters to select. |
clusterLabelSelector | mpa[string]string | The label selector for clusters. Exclusive to "clusters" |
namespace | string | The target namespace to deploy in the selected clusters. If not set, components will inherit the original namespace. |
Example