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

[DEVOPS-635] Refactor waiting for resources to be ready #10

Merged
merged 1 commit into from
Dec 28, 2017

Conversation

jchanam
Copy link
Collaborator

@jchanam jchanam commented Dec 26, 2017

  • Move waiting loops to a new functions
  • Add wait for deletions

@jchanam jchanam requested a review from a team December 26, 2017 17:02
}
}

func (r *RedisFailoverKubeClient) waitForPodDeletion(name string, namespace string, logger log.Logger) {
Copy link

Choose a reason for hiding this comment

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

All this deletion methods could be reduced to one codebase (no code duplication) and pass an interface taht gets the items.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we've discussed, It's more complicated to do an interface because runtime.Object does not implement the Items function (for the list). We'd have to do a manual object copy and it does not worth it.

@jchanam jchanam merged commit e375ca1 into master Dec 28, 2017
@jchanam jchanam deleted the devops-refactor-ready-checks branch December 28, 2017 16:25
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.

2 participants