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

Drop volumes matching name ServiceAccountName-token- #910

Conversation

james-powis
Copy link

Continuation of #843 and #840

Addresses #909

There does not appear to be a test file for the restic_restore_action.go file so this is one of those "this should not break anything, I hope..." I just don't know enough about this project (or go testing in general) to create a test file from scratch.

To that end it compiles, and in go that is a good sign.

@james-powis james-powis changed the title Droping volumes matching name ServiceAccountName-token- Drop volumes matching name ServiceAccountName-token- Oct 4, 2018
@skriss
Copy link
Contributor

skriss commented Oct 5, 2018

@james-powis I was thinking that this should go into pkg/restore/pod_action.go - since we want to remove these volume mounts from any initContainer, not just the restic one. In fact, the error you reported on slack reports an error with initContainer[1], which wouldn't be the restic one, since we always insert the restic one as the first, i.e. initContainer[0].

Can you confirm there was another non-restic initContainer on the workload you had issues with?

@james-powis james-powis force-pushed the fix_restic_restore_service_user_token branch 3 times, most recently from 864b539 to fa4c585 Compare October 5, 2018 21:57
@james-powis james-powis force-pushed the fix_restic_restore_service_user_token branch from fa4c585 to 30369c2 Compare October 5, 2018 22:01
@james-powis
Copy link
Author

@skriss You are right about that... And so it is, ready for your review, should be pretty easy it is nearly an identical duplication of the container volumeMount function and test.

@james-powis
Copy link
Author

Also can I request a release after this is merged, even if it is a pre/beta release, I have a restore I need to perform....

@skriss skriss self-requested a review October 9, 2018 17:09
Copy link
Contributor

@skriss skriss left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @james-powis!

@skriss skriss requested a review from carlisia October 9, 2018 18:23
@skriss
Copy link
Contributor

skriss commented Oct 9, 2018

@carlisia PTAL as well

Copy link
Contributor

@carlisia carlisia left a comment

Choose a reason for hiding this comment

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

👍 and thanks for adding a test!

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

Successfully merging this pull request may close these issues.

4 participants