-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
docker driver: add fall back image in docker hub #8320
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
// github packages docker does _NOT_ support pulling by sha as mentioned in the docs: | ||
// https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages | ||
BaseImageFallBack = fmt.Sprintf("docker.pkg.github.com/kubernetes/minikube/kicbase:%s", Version) | ||
BaseImageFallBack2 = fmt.Sprintf("docker.pkg.github.com/kubernetes/minikube/kicbase:%s", Version) |
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.
I think it would be cleaner to create an array of images, and then go through them in order until we find one that works
var BaseImages = []string{
fmt.Sprintf("gcr.io/k8s-minikube/kicbase:%s@sha256:%s", Version, baseImageSHA),
fmt.Sprintf("kicbase/stable:%s@sha256:%s", Version, baseImageSHA),
fmt.Sprintf("docker.pkg.github.com/kubernetes/minikube/kicbase:%s", Version)
}
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.
sounds good the problem is when looping over the array, would need to detect if there is not any more fallback to return the error, seems like a good idea for a follow up refactor
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.
I agree, this should definitely be a slice.
Travis tests have failedHey @medyagh, 1st Buildmake test
TravisBuddy Request Identifier: cf339fa0-a1de-11ea-b485-534d9f3e4954 |
Codecov Report
@@ Coverage Diff @@
## master #8320 +/- ##
=======================================
Coverage 34.37% 34.37%
=======================================
Files 147 147
Lines 9469 9469
=======================================
Hits 3255 3255
Misses 5814 5814
Partials 400 400 |
No description provided.