From 334565a581f01ee34e5e1fa20c724fb3a3dad974 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Tue, 10 Sep 2024 20:33:12 +0300 Subject: [PATCH] Fix argocd deployment on macOS We did not flatten the config since it is not needed in minikube, using path to the certificate. But in lima we get the actual certificate from the guest, and without flattening we get: clusters: - name: drenv-test-cluster cluster: server: https://192.168.105.45:6443 certificate-authority-data: DATA+OMITTED users: - name: drenv-test-cluster user: client-certificate-data: DATA+OMITTED client-key-data: DATA+OMITTED ... `DATA-OMITTED` is not a valid certificate, so argocd fail to parse it. With this change argocd works, and we can use regional-dr.yaml on macOS. Signed-off-by: Nir Soffer --- test/drenv/__init__.py | 2 +- test/drenv/drenv_test.py | 1 + test/envs/regional-dr-lima.yaml | 74 --------------------------------- 3 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 test/envs/regional-dr-lima.yaml diff --git a/test/drenv/__init__.py b/test/drenv/__init__.py index 38ee830c56..6218b9c85d 100644 --- a/test/drenv/__init__.py +++ b/test/drenv/__init__.py @@ -105,7 +105,7 @@ def temporary_kubeconfig(prefix="drenv."): """ with tempfile.TemporaryDirectory(prefix=prefix) as tmpdir: kubeconfig = os.path.join(tmpdir, "kubeconfig") - out = kubectl.config("view", "--output=yaml") + out = kubectl.config("view", "--flatten", "--output=yaml") with open(kubeconfig, "w") as f: f.write(out) env = dict(os.environ) diff --git a/test/drenv/drenv_test.py b/test/drenv/drenv_test.py index a9f42805b8..4f972ad63f 100644 --- a/test/drenv/drenv_test.py +++ b/test/drenv/drenv_test.py @@ -149,6 +149,7 @@ def get_config(context=None, kubeconfig=None): args = [ "view", "--minify", + "--flatten", "--output=json", ] if kubeconfig: diff --git a/test/envs/regional-dr-lima.yaml b/test/envs/regional-dr-lima.yaml deleted file mode 100644 index 711ead0ff3..0000000000 --- a/test/envs/regional-dr-lima.yaml +++ /dev/null @@ -1,74 +0,0 @@ -# SPDX-FileCopyrightText: The RamenDR authors -# SPDX-License-Identifier: Apache-2.0 - -# Environment for testing Regional-DR. ---- -name: "rdr" - -ramen: - hub: hub - clusters: [dr1, dr2] - topology: regional-dr - features: - volsync: true - -templates: - - name: "dr-cluster" - driver: "$vm" - container_runtime: containerd - network: "$network" - cpus: 4 - memory: "6g" - extra_disks: 1 - disk_size: "50g" - feature_gates: - - StatefulSetAutoDeletePVC=true - workers: - - addons: - - name: rook-operator - - name: rook-cluster - - name: rook-toolbox - - name: rook-pool - - name: rook-cephfs - - addons: - - name: ocm-cluster - args: ["$name", "hub"] - - name: recipe - - addons: - - name: external-snapshotter - - name: csi-addons - - name: olm - - name: minio - - name: velero - - name: "hub-cluster" - driver: "$vm" - container_runtime: containerd - network: "$network" - cpus: 2 - memory: "4g" - workers: - - addons: - - name: ocm-hub - - name: ocm-controller - - name: olm - - addons: - - name: submariner - args: ["hub", "dr1", "dr2"] - # - name: argocd - # args: ["hub", "dr1", "dr2"] - -profiles: - - name: "dr1" - template: "dr-cluster" - - name: "dr2" - template: "dr-cluster" - - name: "hub" - template: "hub-cluster" - -workers: - - addons: - - name: rbd-mirror - args: ["dr1", "dr2"] - - addons: - - name: volsync - args: ["dr1", "dr2"]