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
MigCluster : Use generateName to create unique secrets #759
Conversation
… MigRepository secret
@@ -304,7 +327,7 @@ function* updateClusterRequest(action) { | |||
|
|||
// Pushing a request fn to delay the call until its yielded in a batch at same time | |||
updatePromises.push(() => client.patch( | |||
secretResource, clusterValues.name, newTokenSecret)); | |||
secretResource, currentCluster.spec.serviceAccountSecretRef.name, newTokenSecret)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I am assuming that Cluster name is not changeable from UI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove cluster is currently broken with this PR This was a result of deleting a cluster without the associated changes in this PR. Works fine if you add & delete cluster with the updated code.
@ibolton336 added a fix to address the problem you saw. safe guarded the case when - associated Secret does not exist and we try to delete a cluster. |
Add network error check for alert modal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs some code formatting changes for ternary consistency. Otherwise LGTM
Fixes #396
Proposed Changes :
[1] Creating new MigCluster
generateName
instead ofname
in tokenSecret of MigCluster. We also introduce two new labels on the Secret :createdForResourceType
,createdForResource
. This makes it easier to find a secret associated with a cluster.[2] Deleting MigCluster
[3] Editing MigCluster