f8 not setting imagestreams resourceVersion properly.
See original GitHub issuef8 not setting imagestreams resourceVersion properly.
Description
I wrote the following yml config for an imageStream:
apiVersion: image.openshift.io/v1
kind: ImageStream
metadata:
labels:
environment: develop
name: develop
spec:
dockerImageRepository: <privateRepo>:5000/cbom/develop
lookupPolicy:
local: true
tags:
- from:
kind: DockerImage
name: <privateRepo>:5000/cbom/develop:latest
importPolicy:
scheduled: true
if I run fabric8: resource-Goal it succeeds properly But running fabric8:apply-Goal afterwards fails with:
F8: Failed to create ImageStream from openshift.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: <OpenShift Url>/apis/image.openshift.io/v1/namespaces/testpro/imagestreams/develop. Message: imagestreams.image.openshift.io "develop" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=metadata.resourceVersion, message=Invalid value: 0x0: must be specified for an update, reason=FieldValueInvalid, additionalProperties={})], group=image.openshift.io, kind=imagestreams, name=develop, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=imagestreams.image.openshift.io "develop" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: PUT at: <OpenShift Url>/apis/image.openshift.io/v1/namespaces/testpro/imagestreams/develop. Message: imagestreams.image.openshift.io "develop" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update. Received status: Status(apiVersion=v1, code=422, details=StatusDetails(causes=[StatusCause(field=metadata.resourceVersion, message=Invalid value: 0x0: must be specified for an update, reason=FieldValueInvalid, additionalProperties={})], group=image.openshift.io, kind=imagestreams, name=develop, retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status, message=imagestreams.image.openshift.io "develop" is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid, status=Failure, additionalProperties={}).
I tried Setting resourceVersion: 1
in the metadata section but got:
F8: Failed to create ImageStream from openshift.yml. io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: <OpenShift Url>/apis/image.openshift.io/v1/namespaces/testpro/imagestreams. Message: resourceVersion should not be set on objects to be created. Received status: Status(apiVersion=v1, code=500, details=null, kind=Status, message=resourceVersion should not be set on objects to be created, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST at: <OpenShift Url>/apis/image.openshift.io/v1/namespaces/testpro/imagestreams. Message: resourceVersion should not be set on objects to be created. Received status: Status(apiVersion=v1, code=500, details=null, kind=Status, message=resourceVersion should not be set on objects to be created, metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=null, status=Failure, additionalProperties={}).
BUT If I went to the Web UI choose Import YAML/JSON
under the Add to Project
-Button and copied the exact same Config above (without the resourceVersion setting) it worked without any problems
Info
- f-m-p version : 4.2.0
- Maven version (
mvn -v
) :
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: C:\Development\apps\Maven
Java version: 1.8.0_102-1-redhat, vendor: Oracle Corporation
Java home: C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.102-1\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
- Kubernetes / OpenShift setup and version : Red Hat OpenShift Version
OpenShift Master:
v3.11.0+3b2d3b6-227
Kubernetes Master:
v1.11.0+d4cacc0
OpenShift Web Console:
v3.11.0+ea42280
- If it’s a bug, how to reproduce : Create a configfile for an ImageStream and try to execute fabric8:resource and afterwards fabric8:apply
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (3 by maintainers)
Top Results From Across the Web
Unable to build the image using the OpenShift build service ...
This usually happens when the is either really slow to download artifacts from the Internet or can't download them.
Read more >Managing image streams | OpenShift Container Platform 4.6
Image streams do not contain actual image data, but present a single virtual view of related images, similar to an image repository.
Read more >Search OpenShift CI
#2102632 bug 13 days ago
#1913316 bug 19 months ago
#1912674 bug 22 months ago
#1897073 bug 21 months ago
Read more >1828709 – OpenShift ImageStream not working in ...
Description of problem: In a disconnected environment, imageStream's are not working as expected. Jaeger team is using oauth-proxy image from imageStream ...
Read more >fabric8-quickstarts - Bountysource
pipe/docker_engine' and no external provider like Docker machine ... The README should be updated to specify that a role must bne added to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nikolaaleks : It is already there: https://search.maven.org/artifact/io.fabric8/fabric8-maven-plugin/4.3.1/maven-plugin
You should start using the official Maven search, and not the “commercial” one. 😉
Hi @rohanKanojia,
Can you tell me when the FMP 4.3.1 will be available also in maven central repository - https://mvnrepository.com/artifact/io.fabric8/fabric8-maven-plugin ? Is that something that you control? Thank you in advance!
Regards, Nikola