You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating a BuildConfig with spec.output.to.kind: ImageStreamTag, and a value for spec.output.to.namespace gives an error:
Example build config:
spec:
output:
to:
kind: ImageStreamTag
namespace: example
name: example.com/test/test:latest
Error Message:
The Build {build-name} is invalid: spec.output.to.namespace: Invalid value: "example": namespace is not valid when used with a 'DockerImage'
Replication Steps
Create a build config using the above spec
Start build with
oc start-build {build-name}
Cause:
Normally this error would come up with a build config like this:
spec:
output:
to:
kind: DockerImage
namespace: example
name: example.com/test/test:latest
where there is a kind: DockerImage with a namespace value. This is invalid as the namespace value should only be used with kind: ImageStreamTag.
However in this case there is an issue with the operator where it is changing the spec incorrectly:
In lines 145-149 of quay-bridge-operator/pkg/webhook/webhook.go we have this code in the mutating webhook which changes the spec.output.to value to DockerImage.
ricardomaraschini
changed the title
Issue with BuildConfig being mutated incorrectly
Issue with BuildConfig being mutated incorrectly (PROJQUAY-2898)
Feb 3, 2022
ricardomaraschini
changed the title
Issue with BuildConfig being mutated incorrectly (PROJQUAY-2898)
Issue with BuildConfig being mutated incorrectly
Feb 3, 2022
Issue
Creating a BuildConfig with spec.output.to.kind: ImageStreamTag, and a value for spec.output.to.namespace gives an error:
Example build config:
Error Message:
Replication Steps
Create a build config using the above spec
Start build with
oc start-build {build-name}
Cause:
Normally this error would come up with a build config like this:
where there is a kind: DockerImage with a namespace value. This is invalid as the namespace value should only be used with kind: ImageStreamTag.
However in this case there is an issue with the operator where it is changing the spec incorrectly:
In lines 145-149 of
quay-bridge-operator/pkg/webhook/webhook.go
we have this code in the mutating webhook which changes the spec.output.to value to DockerImage.However there is no code which checks for the existence of the spec.output.to.namespace value and deletes it, thus causing the error.
The text was updated successfully, but these errors were encountered: