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

Support a Kubernetes backend #31

Open
wagoodman opened this issue Oct 3, 2018 · 2 comments
Open

Support a Kubernetes backend #31

wagoodman opened this issue Oct 3, 2018 · 2 comments

Comments

@wagoodman
Copy link
Owner

It would ideal to allow for tracking of assets in Kubernetes. This would further extend the exec command to get a shell into one or more containers (or all containers in a pod with tmux).

This is a good starting point for how the mechanisms of streaming to/from the container (seems more kosher than wrapping kubectl): https://github.com/kubernetes-client/python/blob/master/examples/exec.py

@sanghisha145
Copy link

I would like to work on this, let me know what to start with and what to be done with?

@wagoodman
Copy link
Owner Author

This is a larger issue that hasn't been fully worked out, so it could probably be broken into further smaller issues/PRs, but here's a start:

  • add a new Inventory class that inherits from and further implements the InventorySource (in bridgy/inventory/source.py) and put under bridgy/inventory/kubernetes.py.
  • Add a new InstanceType (something like KUBERNETES or K8S)
  • The definition of Instance may need to change or take a nested payload with inventory-specific items.
  • Update the handle_exec method in main.py to be able to exec into a K8s container, similar to https://github.com/kubernetes-client/python/blob/master/examples/exec.py
  • Document the configuration changes with examples of how to configure a K8s inventory source.

Shout out if you want some help/clarity, @sanghisha145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants