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

Helm v3 changes #105

Merged
merged 20 commits into from
Feb 3, 2020
Merged

Helm v3 changes #105

merged 20 commits into from
Feb 3, 2020

Conversation

almahmoud
Copy link
Member

@almahmoud almahmoud commented Jan 28, 2020

Migrations still need to be done, but I thought I'd PR code changes first for collective input

cloudman/projman/management/commands/create_namespace.py Outdated Show resolved Hide resolved
cloudman/projman/kubectl/client.py Outdated Show resolved Hide resolved
cloudman/projman/kubectl/helpers.py Outdated Show resolved Hide resolved
cloudman/projman/kubectl/client.py Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Jan 30, 2020

Coverage Status

Coverage increased (+1.4%) to 90.292% when pulling f517524 on helm_v3 into 7195774 on master.

@almahmoud
Copy link
Member Author

Tests finally passed. Let me know if I should change anything else

Copy link
Member

@nuwang nuwang left a comment

Choose a reason for hiding this comment

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

Thanks for these changes. I think we are pretty close. Now that Helmsman wraps both Helm and some Kubernetes functionality, the name doesn't seem as clean anymore, but I guess that's ok. I imagine in future we'll need an OperaMan as well :-)

cloudman/helmsman/helm/client.py Outdated Show resolved Hide resolved
cloudman/helmsman/helm/client.py Outdated Show resolved Hide resolved
cloudman/helmsman/tests/test_helmsman_api.py Show resolved Hide resolved
@nuwang
Copy link
Member

nuwang commented Jan 30, 2020

After this change, I'm guessing we'll no longer be able to use the default namespace, because projman will raise an error if you try to create a project with an existing namespace. I think this is a good thing, because default is an implicit namespace, and we probably want to avoid exposing things that get installed to default for security reasons.
@almahmoud @afgane Any thoughts on what the new default namespace could be called? "initial" or "starter" perhaps?

@almahmoud
Copy link
Member Author

almahmoud commented Jan 30, 2020

I don't mind changing the initial project, but I did special-case default to not throw an error even if namespace exists and not delete it (https://github.com/galaxyproject/cloudman/pull/105/files#diff-3d0ef3ae18103076ef9de75ea24376bdR105). Since kubectl will install into default namespace when no namespace is specified, I thought it would be good to have the project by default. I would even say let's make the project non-deletable as well potentially?

@@ -6,21 +6,27 @@
import yaml


class MockHelm(object):
class MockClient(object):
Copy link
Member

@nuwang nuwang Jan 31, 2020

Choose a reason for hiding this comment

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

I think we should have a new class called MockKube or something? These two things don't belong together I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

But we are ultimately just replacing the run_command. I guess we could separate them into separate parsers, but in the end, for the mock client the command that matters is mock_run_command
everything else is just helpers, so I would argue that the client should be a single mock client. I separated the parsers for helm and kubectl commands though in 88ab6e6

cloudman/helmsman/clients/kubectl_client.py Outdated Show resolved Hide resolved
@almahmoud
Copy link
Member Author

All changes now working, and made some more bug fixes as it was working with mock but not the real helm client (helm 3 does not list releases from other namespaces by default).
Also packaged and working in the wild on am-dev, with both cloudman-boot and cloudman helm v3

@almahmoud
Copy link
Member Author

almahmoud commented Feb 1, 2020

I believe it's now ready to merged, along with CloudVE/cloudman-helm#12 and CloudVE/cloudman-boot#10. Can be tested as am-dev Cloudman 2.0 appliance on CL.

@nuwang nuwang merged commit 4c25190 into master Feb 3, 2020
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.

None yet

4 participants