Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Adding kubernetes-cpi to existing Bosh Director #4

Open
jhiemer opened this issue Jan 10, 2018 · 7 comments
Open

Adding kubernetes-cpi to existing Bosh Director #4

jhiemer opened this issue Jan 10, 2018 · 7 comments

Comments

@jhiemer
Copy link

jhiemer commented Jan 10, 2018

Hi,
currently the whole documentation references the installation of CPI via the creation of new bosh director. As it is possible to have a multi CPI setup in the meanwhile, I wanted to ask what would be the best way to deploy the Kubernetes CPI to an existing director?

Thanks!

@loewenstein
Copy link
Contributor

@jhiemer Unfortunately the kubernetes cpi is not yet prepared to be configured via cpi config. I.e. you cannot run it as multi cpi.

What is your specific use case?

@jhiemer
Copy link
Author

jhiemer commented Jan 11, 2018

@loewenstein my initial idea was to deploy it beside our OS CPI and try to do some bosh deployments onto our K8s Cluster.

What is missing until the CPI is deployable?

@jhiemer jhiemer changed the title Adding kubernetes-cpi to existing directory Adding kubernetes-cpi to existing Bosh Director Jan 11, 2018
@loewenstein
Copy link
Contributor

bosh-cpi-haskell should support getting configuration from RPC context, as per

CPI should be able to accept properties in context key and use them instead of its job properties 
see context key in https://bosh.io/docs/build-cpi.html#request

in https://github.com/cloudfoundry/bosh-notes/blob/master/proposals/multi-cpi.md

@jhiemer
Copy link
Author

jhiemer commented Jan 16, 2018

@loewenstein could you help me to understand your answer? I am not sure if I get it completely.

@loewenstein
Copy link
Contributor

@jhiemer sure. The default mechanism for a CPI to get its configuration (api endpoint, credentials, ...) is a configuration file template in the Bosh release that gets rendered onto the VM that is running the director and cpi jobs.

Multi-cpi introduced a separate configuration (with api endpoint, credentials, ...) that can be uploaded to the director (with bosh update-cpi-config).
The corresponding configuration will be provided to the cpi with each RPC call (e.g. create_vm) in the context parameter. In order to support multi-cpi, the cpi has to read that additional bit of information from context and merge it with the base config provided via rendered config.

That is not yet supported by bosh-cpi-haskell which is the base cpi implementation used by the Kubernetes cpi.

Does that help?

@jhiemer
Copy link
Author

jhiemer commented Jan 16, 2018

@loewenstein I see. Thanks a lot for the explanation. There are no plans from your site in the near future to add this functionality?

@loewenstein
Copy link
Contributor

loewenstein commented Jan 16, 2018 via email

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

No branches or pull requests

2 participants