-
-
Save danielhelfand/6b63ba3f250ea596a077904d43abaf62 to your computer and use it in GitHub Desktop.
{ | |
"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" | |
} | |
} | |
] | |
} | |
} |
Hey @rdruss! Could you explain? I’m not completely following.
@danielhelfand, I could be incorrectly parsing the YAML for the imagestream, but to me it looks like the "latest"
tag has a "from"
defined as:
"from": {
"kind": "ImageStreamTag",
"name": "1.10.2"
while the "1.10.2"
tag has a "from"
defined as:
"from": {
"kind": "DockerImage",
"name": "docker.io/centos/go-toolset-7-centos7:latest"
where I would have expected the opposite. I don't think you can submit a PR to a gist so you can see the change, but I did fork and you can see the changes here: https://gist.github.com/rdruss/fbc76946d411db2859e166aa5fc39782/revisions
So what's confusing about the latest
tag for the go-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 the 1.10.2
tag would not work as expected. The tag needs to reference an image that supports Go 1.10.2. The reason latest
uses "kind": "ImageStreamTag"
and "name": "1.10.2"
is because latest
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 the latest
tag corresponds to the imagestream tag with the latest version.
There's more examples available under Software Collections.
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.
@danielhelfand, it looks to me like you have the "from" sections switched around.