-
Notifications
You must be signed in to change notification settings - Fork 707
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
Deploy a chart via flux #3640
Deploy a chart via flux #3640
Conversation
yeah, that was kind of intended. For the 'CreateInstalledPackage' operation I have potentially up to 3 different namespaces to work with:
|
Yeah, OK. So yes, 3 is obvious - the resources should be in the target namespace, but I'd be keen for (2) the helm release CR to also be created in the target namespace (where the helm release itself is currently created, as shown above), if that also makes sense to you? I mean, the API request is to create an installed package in the default namespace, but what is returned by the API is an installed package in the kubeapps namespace, which is going to be very confusing from a UX point of view (in fact, I don't know that we can even represent that in a sane way... the installed package / HelmRelease CR got created in the kubeapps namespace, the actual helm release is listed as being in the default namespace where the resources are). So yes, if you're OK with that, +1 to change that so the installed package / helm release CR is created in the target namespace indicated in the request? |
I am ok with that. Feel free to make that change if you like or I can make it. Whatever lets you go faster |
Thanks. If you can do the fluxv2 change, I'll continue with the dashboard - that'd be great. |
No problem. Follow-up question: if the target namespace does not exist (fairly common use case), should I create it programmatically inside the ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks for the changes here!
} as AvailablePackageReference, | ||
packageVersion, | ||
), | ||
actions.packages.fetchAndSelectAvailablePackageDetail(packageReference, packageVersion), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat!
For now, I'd let it fail as a bad request. It doesn't affect our UX since the create request is always in the context of a namespace that is already created. And longer term...
Yes, longer term we can support this if there is a need. But for now, +1 to fail with a bad request. Thanks Greg. |
Signed-off-by: Michael Nelson <minelson@vmware.com>
Sounds good. Will do that. What is gRPC code for 'bad request'? I don't see one |
Description of the change
Similar to the last PR #3628 , this one updates the deploymentform routes so that the available package's namespace is referenced explicitly, rather than relying on a global or namespaced repo.
With this change, I'm able to deploy bitnami apache (pod only, see below) via Flux! Woohoo! But before you get too excited, it just brings us to the next point of integration excitement. See the additional notes below.
Benefits
One step closer to fluxv2 UX integration.
Possible drawbacks
Applicable issues
Additional information
The UX fails to find the release that it just tried to create in the default namespace:
It appears that although my Apache pod is appearing in the correct namespace (default), the
HelmRelease
resource is created in thekubeapps
namespace, rather than the default namespace:Checking the api server logs shows that it's receiving the request to create the installed package in the default namespace:
I'm assuming this isn't intended, but I'll let @gfichtenholt take a look before I investigate more.
There are other issues in the UX which we'll need to deal with next too. In particular, the UX is immediately trying to request the helm release (via the old kubeops service - this was unexpected), which (a) won't exist immediately and (b) the UX can't assume a helm release is created, we should only be getting installed packages. In my case, the helm release fails as does the flux reconciliation, although the apache pod was created - need to dig more there.