You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This script is intended for editing the raw cluster configuration that is used by the automation agents.
4
+
# For example if we want to test new features implemented by the automation agent, we can check its behavior by configuring new settings directly in the raw cluster config.
5
+
# Steps to do that:
6
+
# 1. Deploy replica set, named here "my-replica-set" in "mongodb" namespace.
7
+
# 2. Stop the operator, e.g. by scaling operator deployment to 0. Without this step the operator will overwrite any changes made to the cluster config in the secret.
8
+
# 3. Edit the cluster config by running: ./edit_cluster_config.sh mongodb my-replica-set, or EDITOR=my-editor ./edit_cluster_config.sh mongodb my-replica-set (if you don't want to use vim)
9
+
# 4. It will download the cluster config from the secret and open it in the editor.
10
+
# 5. Make some changes to the cluster config, e.g. add new settings. Remember to increment version field, otherwise the changes won't be applied.
11
+
# 6. Save the changes and exit the editor. The config will be checked if it's a correct json and will be uploaded to the secret.
12
+
# 7. Observe the changes made by the mongodb-agent. Be aware, that starting the operator again will overwrite the changes.
13
+
14
+
namespace=$1
15
+
replicaset_name=$2
16
+
secret_name=${replicaset_name}-config
17
+
18
+
if [[ "${namespace}"==""||"${replicaset_name}"=="" ]];then
19
+
echo"Edit automation config secret for given replicaset."
20
+
echo"It looks for the secret named '<replicaset_name>-secret' in the given namespace."
21
+
echo"Requires jq to be installed and uses current kubectl context."
0 commit comments