[RHOCP 4.x] The option "--dry-run=server" makes permanent changes to secrets and configmaps
Issue
-
Using the option
--dry-run=server
makes permanent changes to configmaps and secrets in the OpenShift cluster -
When using
--dry-run=server
as an argument, the changes were made persistently and the config map data gets modified as below. Similar behaviour is observed when used with secrets.
$ oc set data cm/cm-testing --from-literal=name=def --dry-run=server
configmap/cm-testing data updated (server dry run)
$ oc get cm cm-testing -oyaml
apiVersion: v1
data:
name: def >>>>>>>>>>>>>>>>>>>> The data changes persistently
kind: ConfigMap
metadata:
creationTimestamp: "2021-12-16T02:55:19Z"
name: cm-testing
namespace: testnamespace
resourceVersion: "4975721"
uid: 0f0a1052-059d-49f2-95e8-e8fad775161b
Environment
- Red Hat OpenShift Container Platform
- 4.7
- 4.8
- 4.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.