-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
che-plugin-registry cannot replace image tag according to CHE_SIDECAR_CONTAINERS_REGISTRY_URL
#19405
Comments
Yes, I am running into the same issue as well. I did some digging and this was introduced in version 7.26.0. A single quote surrounding the image name got added by the build process. See below:
See no quote around In image version 7.26.0 up to now
We now have quotes surrounding The problem is with the IMAGE_REGEX. It is expecting double-quotes instead of single-quotes. I am not sure if the build process should be writing out double-quotes or if the IMAGE_REGEX should be updated to support single-quotes? |
There is also another problem with this
Notice Because of this, we end up with an init-container referencing a public image, which crashes the workspace creation process in an air-gapped setup. |
Hello! I have the same problem in airgap mode installation with devfile and plugin registry... ./build.sh --organization "${ORGANIZATION}" \
--registry "${INTERNAL_REGISTRY_URL}" \
--tag "${TAG_NIGHTLY}" \
--offline If I run podman command against new image builded I get: podman run --authfile=${REG_CREDS} -it --rm \
--entrypoint cat "${INTERNAL_REGISTRY_URL}":5000/${ORGANIZATION}/che-devfile-registry:${TAG_NIGHTLY} /var/www/html/devfiles/external_images.txt
Should not sustitute build.sh the quay.io organization? |
I was able to fix both the single quote issue as well as the multi-line issue. Those can easily be fixed by changing the options to js-yaml // add spec object
metaYaml.spec = spec;
const yamlString = jsyaml.safeDump(metaYaml, { quotingType: '"', lineWidth: -1 });
const generated = { ...metaYaml };
generated.id = `${computedId}/${version}`;
metaYamlPluginGenerated.push(generated); and const devfileYaml = this.metaYamlToDevfileYaml.convert(metaYaml);
if (devfileYaml) {
const devfilePath = path.resolve(pluginsFolder, computedId, version, 'devfile.yaml');
const devfileYamlString = jsyaml.safeDump(devfileYaml, { quotingType: '"', noRefs: true, lineWidth: -1 });
promises.push(fs.writeFile(devfilePath, devfileYamlString));
} Changing the Hopefully this is all you need to create a fix @sunix @ericwill. I could have done a PR, but I was not comfortable to test everything. |
Hello @cccs-eric, @wcho and @flacatus , Looks like this is duplicating #19492 I have a PR open, would be nice if you could have a look and test if it works for you: eclipse-che/che-plugin-registry#937. It should cover the multi-line and quotes issues. |
@sunix I commented on your PR. |
Hello eclipse-che/che-plugin-registry#937 has been merged. I am closing this issue. Thanks! |
Describe the bug
che-plugin-registry does not replace image tag according to
CHE_SIDECAR_CONTAINERS_REGISTRY_URL
.It seems that the replace process in che-plugin-registry
entrypoint.sh
does not work properly. Maybe due to invalid regex.Che version
Steps to reproduce
I deployed CheCluster using
airGapContainerRegistryHostname
andairGapContainerRegistryOrganization
with custom value.It sets
CHE_SIDECAR_CONTAINERS_REGISTRY_URL
andCHE_SIDECAR_CONTAINERS_REGISTRY_ORGANIZATION
for plugin-registry pod. But che-plugin-registry does not replace image tags inmeta.yaml
files.Expected behavior
Image tags in
meta.yaml
files should be replaced with provided registry and organization.Runtime
kubectl version
)oc version
)minikube version
andkubectl version
)minishift version
andoc version
)docker version
andkubectl version
)Screenshots
Installation method
chectl version
commandEclipse Che Logs
Additional context
The text was updated successfully, but these errors were encountered: