Skip to content

Commit

Permalink
Fix argocd deployment on macOS
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
nirs committed Sep 11, 2024
1 parent fca5683 commit 334565a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 75 deletions.
2 changes: 1 addition & 1 deletion test/drenv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions test/drenv/drenv_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def get_config(context=None, kubeconfig=None):
args = [
"view",
"--minify",
"--flatten",
"--output=json",
]
if kubeconfig:
Expand Down
74 changes: 0 additions & 74 deletions test/envs/regional-dr-lima.yaml

This file was deleted.

0 comments on commit 334565a

Please sign in to comment.