ResourceTransformation
Metro and asynchronous disaster recovery (DR) involves migrating Kubernetes resources from a source cluster to a destination cluster. To ensure applications can come up correctly on the destination clusters, you may need to modify resources such as Service
, ServiceAccount
or ConfigMap
to work as intended on your destination cluster. The ResourceTransformation feature allows you to define a set of rules that modify the Kubernetes resources before they are migrated to the destination cluster.
ResourceTransformation is a custom resource (CR) that accepts change rules that stork follows to modify resources from a source cluster before applying them onto a destination cluster.
ResourceTransformation schema
-
Path: the YAML path for a given Kubernetes resource you want to perform an operation on. Provide this in dot notation, e.g.
metadata.labels
. -
Value: what value you want to update the selected resource to. For example, if
path
isspec.replicas
, you can specify a value of4
. -
Type: the currently supported data type you want to update values to. Type can be one of the following:
Type Value Example KeyPair Comma separated key value pair for patching map type in resource specs a:b,c:d,e:f,g:h
<key1:value1>, <key2:value2>, … <keyN:valueN>List Comma separated array element list for patching resource specs [a,b,c,d]
<val1,val2,…,valN>Int Integer type value for updating resources 0 String String type values