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

Bug 1565545 - Adding migration of extracted credentials #895

Merged
merged 2 commits into from May 1, 2018

Conversation

shawn-hurley
Copy link
Contributor

Describe what this PR does and why we need it:

Currently we do not migrate extracted credentials to the new mode of saving/retrieving/updating/deleting credentials.

Changes proposed in this pull request

  • add to migration ability to get all extracted creds for a service instance, and binding
  • save the extracted creds as a secret using the helper methods

Which issue this PR fixes (This will close that issue when PR gets merged)

https://bugzilla.redhat.com/show_bug.cgi?id=1565545

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 17, 2018
@jmrodri jmrodri self-requested a review April 24, 2018 13:56
Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

Some questions and we need comments.

revertBindInstance(biSaved)
revertServiceInstance(siSaved)
revertCrdSavedSpecs(crdSavedSpecs)
panic(fmt.Sprintf("Unable to migrate all extracted credentials - %v", err))
Copy link
Contributor

Choose a reason for hiding this comment

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

would we want to see which extracted credential failed to migrate?

revertCrdSavedSpecs(crdSavedSpecs)
panic(fmt.Sprintf("Unable to migrate all extracted credentials - %v", err))
}
k8scli, err := clients.Kubernetes()
Copy link
Contributor

Choose a reason for hiding this comment

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

this feels out of place, like we should've gotten this early on in the process before we even tried to get any of the extracted credentials. I guess it's okay here, just feels weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this something that you want me to change?

Namespace: options.MigrationNamespace,
})
}
for _, bi := range biSaved {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need a comment between the different sections:

//
// Convert Binding Instances
//
...
//
// Converting Extracted Credentials
//
...

Copy link
Contributor

Choose a reason for hiding this comment

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

what's with the 3 commented lines?

@shawn-hurley
Copy link
Contributor Author

@djzager djzager merged commit 8503563 into openshift:master May 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants