Last active
April 14, 2020 12:07
-
-
Save danielhelfand/6b63ba3f250ea596a077904d43abaf62 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apiVersion": "v1", | |
"kind": "ImageStream", | |
"metadata": { | |
"annotations": { | |
"openshift.io/display-name": "Go" | |
}, | |
"name": "golang" | |
}, | |
"spec": { | |
"tags": [ | |
{ | |
"name": "latest", | |
"annotations": { | |
"description": "Build and run Go applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/golang-container/blob/master/1.10/README.md.\n\nWARNING: By selecting this tag, your application will automatically update to use the latest version of Go available on OpenShift, including major versions updates.", | |
"iconClass": "icon-go-gopher", | |
"openshift.io/display-name": "Go (Latest)", | |
"openshift.io/provider-display-name": "", | |
"sampleRepo": "https://github.com/sclorg/golang-ex.git", | |
"supports": "golang", | |
"tags": "builder,golang,go" | |
}, | |
"from": { | |
"kind": "ImageStreamTag", | |
"name": "1.10.2" | |
}, | |
"referencePolicy": { | |
"type": "Local" | |
} | |
}, | |
{ | |
"name": "1.10.2", | |
"annotations": { | |
"description": "Build and run Go applications on CentOS 7. For more information about using this builder image, including OpenShift considerations, see https://github.com/sclorg/golang-container/blob/master/1.10/README.md.", | |
"iconClass": "icon-go-gopher", | |
"openshift.io/display-name": "Go 1.10.2", | |
"openshift.io/provider-display-name": "", | |
"sampleRepo": "https://github.com/sclorg/golang-ex.git", | |
"supports": "golang", | |
"tags": "builder,golang,go" | |
}, | |
"from": { | |
"kind": "DockerImage", | |
"name": "docker.io/centos/go-toolset-7-centos7:latest" | |
}, | |
"referencePolicy": { | |
"type": "Local" | |
} | |
} | |
] | |
} | |
} |
Thanks, @danielhelfand! I figured there was some subtlety I was missing.
@rdruss Yeah, no worries! Let me know if you have other questions about it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So what's confusing about the
latest
tag for thego-toolset-7-centos7:latest
image is that it actually supports Go 1.10.2, not the latest version of Go. The image is not well maintained, and the images aren't tagged properly. I've tried reaching out the maintainers to update it, but I haven't had much luck.With regard to the changes you made, referencing
ImageSteam
1.10.2
for the1.10.2
tag would not work as expected. The tag needs to reference an image that supports Go 1.10.2. The reasonlatest
uses"kind": "ImageStreamTag"
and"name": "1.10.2"
is becauselatest
is just a way to tag the actual latest version of what is supported. So each tag corresponds to an image that supports a version, but thelatest
tag corresponds to the imagestream tag with the latest version.There's more examples available under Software Collections.