-
Notifications
You must be signed in to change notification settings - Fork 99
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
kctrl
: When adding a package repo, include option to create the namespace if not existing
#1001
Comments
I agree that this is definitely useful in terms of reducing the number of commands that need to be run to add repositories or install packages but I remember that we have had some similar discussion but I can't seem to recall the details. |
I think it is thoughtful that we are doing this only for PackageRepositories. As generally they would reside any installs will reside in the same namespace that is already created. There is a case for doing this for installs as well since a PackageRepository might be added to the global namespace. But I think a good first step would be to do this only for repository adds as it is the more common use case. |
@100mik as agreed, I'm starting working on this. Should we go with the |
I cannot think of a name that's better, so I believe that is what we would go with 🚀 |
* kctrl: Flag to create namespace when adding repo When adding a new package repository to a cluster, it's now possible to create the installation namespace automatically by specifying the "--create-namespace" flag. Fixes gh-1001 Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Improve error handling Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Optimize status messages for namespace creation Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Add cleanup after tests Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Update test cleanup Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Use cleanup function for new tests Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> * Re-use existing namespace in test Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com> --------- Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
Describe the problem/challenge you have
When I add a Carvel package repository to a cluster, I first need to create a dedicated namespace explicitly.
kubectl create namespace kadras-packages
kctrl package repository add -r kadras-repo --url ghcr.io/arktonix/kadras-packages:0.5.1 -n kadras-packages
Describe the solution you'd like
I'd like to skip the explicit creation of the namespace and have it created as part of the
kctrl package
command, similar to how thehelm
CLI works. For example, the functionality could be enabled via a--create-namespace
flag.kctrl package repository add -r kadras-repo --url ghcr.io/arktonix/kadras-packages:0.5.1 -n kadras-packages --create-namespace
Anything else you would like to add:
One of the reasons for this feature request is to make the onboarding experience even simpler when introducing people to Carvel packaging or when using a Carvel metapackage as the foundation of projects/tutorials relying on a Carvel-based platform.
With this feature, that would result in three operations rather than four:
Vote on this request
This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.
👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"
We are also happy to receive and review Pull Requests if you want to help working on this issue.
The text was updated successfully, but these errors were encountered: