This repository was archived by the owner on Mar 22, 2018. It is now read-only.
Merged
Conversation
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>
… linter error impacting build
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull in code from https://github.com/dims/external-storage/tree/master/openstack/standalone-cinder