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

Check if docker image tags exist on lint #36

Merged
merged 3 commits into from
Nov 14, 2019
Merged

Conversation

Dhouti
Copy link
Contributor

@Dhouti Dhouti commented Nov 14, 2019

No description provided.

Copy link
Contributor

@coderanger coderanger left a comment

Choose a reason for hiding this comment

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

Global variable notwithstanding, looks good.

@Dhouti Dhouti merged commit c9061cc into master Nov 14, 2019
@Dhouti Dhouti deleted the lint-docker-image-names branch November 14, 2019 21:07
if imageTags != nil {
var foundImage bool
for _, imageTag := range imageTags {
if summonObj.Spec.Version == imageTag {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead loop it will good if we use manifests api

 GET | /v2/<name>/manifests/<reference> | Manifest | Fetch the manifest identified by name and reference where reference can be a tag or digest. A HEAD request can also be issued to this endpoint to obtain resource information without receiving all data.

Copy link
Contributor

Choose a reason for hiding this comment

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

That would require 1 API call for every instance instead of getting list all at once and then checking. We could slightly speed this up by putting the image tags into a map[string]bool though.

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.

3 participants