Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"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"
}
}
]
}
}
@rdruss

This comment has been minimized.

Copy link

@rdruss rdruss commented Sep 17, 2019

@danielhelfand, it looks to me like you have the "from" sections switched around.

@danielhelfand

This comment has been minimized.

Copy link
Owner Author

@danielhelfand danielhelfand commented Sep 17, 2019

Hey @rdruss! Could you explain? I’m not completely following.

@rdruss

This comment has been minimized.

Copy link

@rdruss rdruss commented Sep 18, 2019

@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

@danielhelfand

This comment has been minimized.

Copy link
Owner Author

@danielhelfand danielhelfand commented Sep 18, 2019

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.

@rdruss

This comment has been minimized.

Copy link

@rdruss rdruss commented Sep 18, 2019

Thanks, @danielhelfand! I figured there was some subtlety I was missing.

@danielhelfand

This comment has been minimized.

Copy link
Owner Author

@danielhelfand danielhelfand commented Sep 18, 2019

@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
You can’t perform that action at this time.