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

nit: prefer kubectl create over kubectl apply #117

Closed
wants to merge 1 commit into from

Conversation

bacongobbler
Copy link
Contributor

@bacongobbler bacongobbler commented Feb 29, 2024

this forces the client to return a non-zero exit code if the resource already exists. This should be the preferred method for most situations to ensure we don't accidentally change resources in a prod context.

Are there situations where kubectl apply is preferred? e.g. in the Makefile during development?

Copy link

This PR now has an image available for testing:

  ttl.sh/spoopy-operator-pr-117:24h

@endocrimes
Copy link
Contributor

endocrimes commented Feb 29, 2024

Personally I prefer apply in interactive cases (a lot of resources want some degree of iteration and edit(up)(enter) in the terminal is useful) - but I think create is fine in the examples here.

Copy link
Contributor

@michelleN michelleN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense for the smoke tests but I prefer apply for the same reasons @endocrimes mentioned. I use make deploy for dev and testing and iterate quite a bit so apply would be useful.

@bacongobbler
Copy link
Contributor Author

Okay. I'll go revert hack/provision-minikube.sh and the Makefile changes.

charts/spin-operator/README.md Outdated Show resolved Hide resolved
charts/spin-operator/templates/NOTES.txt Outdated Show resolved Hide resolved
Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
@michelleN
Copy link
Contributor

@bacongobbler can we close this PR or do you think we still need these changes?

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

Successfully merging this pull request may close these issues.

3 participants