Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cert manager does not work on Windows #503

Open
nightscape opened this issue Jun 6, 2023 · 4 comments
Open

Cert manager does not work on Windows #503

nightscape opened this issue Jun 6, 2023 · 4 comments

Comments

@nightscape
Copy link

The following line runs a connection test to Cert Manager in a loop:

local("for i in 1 2 3 4 5 6; do (kubectl apply -f - <<EOF" + cert_manager_test_resources_versioned + "EOF\n) && break || sleep 15; done", quiet=silent, echo_off=silent)

Unfortunately, this doesn't work on Windows where local uses cmd which doesn't support this syntax.

One possible way forward would be to do the looping in Python and write the YAML to a file so that the command works without looping and heredocs.
Do you think this would be a good idea?
If so, we can create a PR for it.

@nicks
Copy link
Member

nicks commented Jun 6, 2023

ya, we'd accept a PR to convert it to python. that's what has ended up happening with a lot of tilt extensions.

tilt also supports local(cmd_bat) for specifying a separate windows batch script, which would be fine too

@nightscape
Copy link
Author

We had discovered the cmd_bat, but unfortunately, cmd's restricted feature set makes looping quite ugly, and heredocs don't exist at all. I think using Python for this functionality would keep the code the most readable.
One question: Is there a nice built-in way to create a temp file in Tilt?
We would have to write the cert_manager_test_resources_versioned somewhere where it doesn't annoy 😉

@nicks
Copy link
Member

nicks commented Jun 8, 2023

i usually use mktemp 😬

@QuadmanSWE
Copy link

I was annoyed by this for hours, ended up just commenting out the test cert deployment for this to run on windows.

I can't find any documentation on how to run python commands instead of local(), anyone got any pointers? I would love to contribute a PR to fix this for windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants