Skip to content
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

Currently it is not possible to differentiate che_plugin_sidecar_plugin_registry_image from the RELATED_IMAGEs #20089

Closed
Tracked by #20194
ibuziuk opened this issue Jul 7, 2021 · 13 comments
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Jul 7, 2021

Is your enhancement related to a problem? Please describe.

CSV contains a bunch of the che_plugin_sidecar_plugin_registry_image Related Images - https://github.com/operator-framework/community-operators/blob/b560ec81cd4e586e9cb05c3674426da4971ba3b3/community-operators/eclipse-che/7.32.0/eclipse-che.v7.32.0.clusterserviceversion.yaml#L1029-L1079

This becomes a problem if we want to automatically pre-pull by default some of the sidecar images e.g. java8
Currently, it is simply not possible to differentiate those, since all of them are using the same image names and different digests, and it is only possible to identify by tag names - https://quay.io/repository/eclipse/che-plugin-sidecar?tag=latest&tab=tags

Describe the solution you'd like

It should be possible to differentiate in the CSV che_plugin_sidecar_plugin_registry_image

Describe alternatives you've considered

Not pre-pull sidecar images at all by default

Additional context

This issue is related to #19657

@ibuziuk ibuziuk added kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator labels Jul 7, 2021
@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 7, 2021

@nickboldt would be great to get your input on this

@tolusha
Copy link
Contributor

tolusha commented Jul 16, 2021

Theoretically we can include image tag in RELATED_IMAGE env var name like this:
RELATED_IMAGE_che_plugin_sidecar_plugin_registry_image_java8_1273116_<....>
Will it fit your needs?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 16, 2021

@tolusha that would be great!
cc @dkwon17 I believe we will be able to retrieve the required images based on the pattern in this case

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 21, 2021

will it be possible to get rid of the base32 encoding as part of this issue, which looks like overkill?
Basically, I would propose replacing

- name: RELATED_IMAGE_che_theia_plugin_registry_image_IBZWQYJSGU3DUODEMY3DIOJZGBRDQNZUGA2GIMBXG5RTIOBUGU3DMMRQGE3TINTEGU3DEOJSGE4TCZRRMYYDOZJTMRTGKYTFMM3DSYRYGUYDCNTFGAZQ____
                        value: quay.io/eclipse/che-theia@sha256:8df64990b87404d077c484566201746d56292191f1f07e3dfebec69b85016e03

with

- name: RELATED_IMAGE_che_theia_plugin_registry_image
  value: quay.io/eclipse/che-theia@sha256:8df64990b87404d077c484566201746d56292191f1f07e3dfebec69b85016e03

also, not sure if we really need this plugin_registry_image postfix, IMO we should make it even simpler e.g. RELATED_IMAGE_che_theia

@tolusha
Copy link
Contributor

tolusha commented Jul 21, 2021

Does it cause any issues besides overkill?

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 21, 2021

Does it cause any issues besides overkill?

no, this just looks pretty sophisticated, and there is going to be no need for this. IMO we should keep it as simple as possible

@AndrienkoAleksandr
Copy link
Contributor

AndrienkoAleksandr commented Jul 21, 2021

also, not sure if we really need this plugin_registry_image postfix, IMO we should make it even simpler e.g. RELATED_IMAGE_che_theia

plugin_registry_image/devfile_registry_image postfix was used, because che-operator have to filter images, and inject env variables to the corresponding image registries.

@ibuziuk
Copy link
Member Author

ibuziuk commented Jul 21, 2021

@tolusha @AndrienkoAleksandr just to be clear I'm fine if you would like to continue doing base32 encodings, the most important thing for us atm is to have a possibility to differentiate in the CSV che_plugin_sidecar_plugin_registry_image by the var name - other stuff is optional

@nickboldt
Copy link
Contributor

FWIW here's what we have in the digest pinned version of the CRW csv:

https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/codeready-workspaces-operator-metadata-generated/manifests/codeready-workspaces.csv.yaml#L994

(it's even sorted alphabetically because it avoids random nuissance commits when syncing from upstream.)

Here's the unpinned version (with tags instead of digests):

https://github.com/redhat-developer/codeready-workspaces-images/blob/crw-2-rhel-8/codeready-workspaces-operator-metadata/manifests/codeready-workspaces.csv.yaml#L1012

As you can see, it's cleaner and easier to read... just uses the image path to create the RELATED_IMAGE_* variables.

@nickboldt
Copy link
Contributor

plugin_registry_image/devfile_registry_image postfix was used, because che-operator have to filter images, and inject env variables to the corresponding image registries.

Would this need go away if we fix #19736 and the registries can simply fetch their images from the CSV's RELATED_IMAGE_* list (or the operator's env vars) ?

@tolusha tolusha mentioned this issue Jul 26, 2021
31 tasks
@tolusha tolusha added this to the 7.35 milestone Jul 28, 2021
@tolusha
Copy link
Contributor

tolusha commented Aug 6, 2021

I though it was relatively easy to differentiate images by adding tag to env var name.
But now I don't think so. Sidecar images are already referenced by digests in a plugin-registry and I don't see a way to figure out their tags.

@tolusha tolusha removed this from the 7.35 milestone Aug 10, 2021
@tolusha tolusha mentioned this issue Aug 16, 2021
19 tasks
@ibuziuk
Copy link
Member Author

ibuziuk commented Sep 2, 2021

@ericwill @svor any ideas how can we differentiate che_plugin_sidecar_plugin_registry_image ^ ?

@che-bot
Copy link
Contributor

che-bot commented Mar 1, 2022

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 1, 2022
@che-bot che-bot closed this as completed Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

5 participants