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

--dry-run option has a separate implementation #95

Open
jandubois opened this issue Nov 12, 2024 · 3 comments
Open

--dry-run option has a separate implementation #95

jandubois opened this issue Nov 12, 2024 · 3 comments

Comments

@jandubois
Copy link

As #93 has shown, the manifest generated by spin kube deploy --dry-run does not necessarily match the manifest applied by spin kube deploy.

One of the main reasons to have a --dry-run option is to be able to see what will happen if you let the tool execute the command automatically (e.g. to debug why the tool is not doing what you think it does).

Having separate codepaths for generating the --dry-run output kind of negates this purpose because the implementations can diverge (as has been the case in #93).

So I think the plugin should marshal the configuration generated with the help of the spin operator code into YAML to implement the --dry-run functionality, or alternatively construct the YAML document, and then unmarshal it internally to deploy.

@rajatjindal
Copy link
Member

rajatjindal commented Nov 13, 2024

Hi @jandubois

just to confirm, did you try spin kube deploy --dry-run and spin kube deploy OR by any chance you had tried spin kube scaffold and then spin kube deploy.

in anycase we should update spin kube deploy to use same scaffolding as spin kube scaffold.

@jandubois
Copy link
Author

This worked:

spin kube deploy --dry-run --from ghcr.io/spinkube/containerd-shim-spin/examples/spin-rust-hello:v0.13.0 | kubectl apply -f -

and this one didn't (see #93):

spin kube deploy --from ghcr.io/spinkube/containerd-shim-spin/examples/spin-rust-hello:v0.13.0

The --dry-run version is using core.spinkube.dev and the other version is using core.spinoperator.dev because it uses "github.com/spinkube/spin-operator v0.1.0" to create the manifest.

@rajatjindal
Copy link
Member

thank you for providing additional context. its super helpful.

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

2 participants