Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Integrate external provisioner#45

Merged
dims merged 15 commits intomasterfrom
integrate-external-provisioner
Jan 29, 2018
Merged

Integrate external provisioner#45
dims merged 15 commits intomasterfrom
integrate-external-provisioner

Conversation

@dims
Copy link
Copy Markdown
Owner

@dims dims commented Jan 29, 2018

aglitke and others added 15 commits January 29, 2018 12:35
Kubernetes already has a cinder provisioner which is designed to work
with the openstack cloud provider for clusters which are deployed on
openstack instances.  To avoid confusion, rename this provisioner to
standalone-cinder.

Signed-off-by: Adam Litke <alitke@redhat.com>
In order to prevent other cinder users from clobbering volumes that we
have created for kubernetes we reserve volumes before connecting them
and unreserve them after disconnect (before deletion).

Signed-off-by: Adam Litke <alitke@redhat.com>
- Add make targets for standalone-cinder
- Update the standalone-cinder provisioner to support podified
  deployments:
  - Update the build to produce a docker image
  - Build the provisioner with static flags
  - Allow openstack parameters to be specified in the environment
  - Provide sample deployment.yaml

TODO: Acquire OS_PASSWORD from secret

Signed-off-by: Adam Litke <alitke@redhat.com>
Split the code into two packages: provisioner and volumeservice, and a
command: cinder-provisioner

Signed-off-by: Adam Litke <alitke@redhat.com>
These two structures just bundle function arguments and make it harder
to individually test components.  Get rid of them and just pass the
required parameters directly.

Signed-off-by: Adam Litke <alitke@redhat.com>
In order to facilitate testing and separation of concerns, add a few
broker interfaces which can be swapped at test time for mock
implementations.

clusterBroker contains methods that interact with the k8s API.
 - createSecret
 - deleteSecret

mapperBroker contains methods that interact with volumeMappers
 - newVolumeMapperFromConnection
 - newVolumeMapperFromPV
 - buildPV

volumeServiceBroker contains methods that interact with cinder
 - CreateCinderVolume
 - WaitForAvailableCinderVolume
 - ReserveCinderVolume
 - ConnectCinderVolume
 - DisconnectCinderVolume
 - UnreserveCinderVolume
 - DeleteCinderVolume

Signed-off-by: Adam Litke <alitke@redhat.com>
Signed-off-by: Adam Litke <alitke@redhat.com>
Signed-off-by: Adam Litke <alitke@redhat.com>
If provisioning fails we should attempt to clean up volumes that have
been created.  Add rollback logic which will disconnect, unreserve, and
delete cinder volumes on error as appropriate.

Signed-off-by: Adam Litke <alitke@redhat.com>
Address review comments:
 - Document test enabling interfaces
   - Since they are used only by this package for testing, unexport them
 - Add TODO to check access mode when provisioning

Signed-off-by: Adam Litke <alitke@redhat.com>
When connecting to a deployment using Keystone V3 we
expect/require the Domain Name or ID. This is in the
openrc file for most deployments (ie RDO) however it's
not read in from env variables in the connection code.

This adds the parsing of OS_USER_DOMAIN_NAME to
cinderConfig to fix this and make the provisioner
usable for deployments using Keystone V3.

Fixes Issue: #436
Add the needed config parsing to use noauth, and update the
glide gophercloud reference to include the latest version
with noauth support.
@dims dims merged commit fe21319 into master Jan 29, 2018
@dims dims deleted the integrate-external-provisioner branch February 1, 2018 13:15
dims added a commit that referenced this pull request Mar 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants