Workaround for ImageStreamTags issue on OpenShift 3.6 #6019
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Introduce a minor workaround for an ImageStreamTag issue on OpenShift 3.6+.
Currently, when Che attempts to delete a deployment, the Kubernetes client throws a NullPointerException and workspace cleanup fails. After some testing, it seems like the Deployment status is null only if the docker image specified for the deployment is an ImageStreamTag. If instead the Deployment is specified to use a docker image from e.g. the docker hub, the Deployment's status is not null and it is deleted successfully.
This change replaces the docker pull spec we use for Deployments with the underlying image they refer to.
This is not meant to be a long-term fix. We need to decide if we want to keep trying to use ImageStreams and ImageStreamTags, or if we want to find a better solution.
What issues does this PR fix or reference?
Failure to stop workspaces when running Che on OpenShift 3.6 and higher.
Changelog
(bugfix, OpenShift 3.6 support)
Release Notes
(bugfix, OpenShift 3.6 support)