UNCLASSIFIED - NO CUI

Skip to content

Resolve "Add GenerateExisting option for clone-config"

General MR

Summary

  • Added GenerateExisting option for clone-config. With GenerateExisting Set to true: will allow the generation or cloning process to overwrite or update the existing resource in the target namespace. This is useful if you want to ensure that the latest version of a resource from the source namespace is always reflected in the target namespace, even if a resource with the same name already exists.

Relevant logs/screenshots

$ kubectl create namespace test-clone-config

namespace/test-clone-config created
$ kubectl create namespace source-namespace

kubectl create configmap example-config --from-literal=key1=value1 -n source-namespace
kubectl create secret generic example-secret --from-literal=key=dmFsdWUK -n source-namespace

namespace/source-namespace created
configmap/example-config created
secret/example-secret created
$  kubectl get configmap,secret -n test-clone-config

NAME                           DATA   AGE
configmap/example-config       1      28m
configmap/istio-ca-root-cert   1      43m
configmap/kube-root-ca.crt     1      43m

The configmap/example-config was created in the source-namespace. So, the presence of example-config in the test-clone-config namespace indicates that the cloning worked correctly.

big-bang/bigbang!4980 (diffs)

Linked Issue

#135 (closed)

Upgrade Notices

N/A

Edited by Abimbola Abiola

Merge request reports

Loading