redhat-developer / web-terminal-operator

OpenShift Console Web Terminal
MIT License
41 stars 15 forks source link

Update images in templates even if state is unmanaged #146

Closed amisevsk closed 1 year ago

amisevsk commented 1 year ago

What does this PR do?

Updates images for templates with web-terminal.redhat.com/unmanaged-state: "true" if the image in the template comes from the default image repository.

This ensures that fixes/updates are still applied to WTO installs in clusters even if an admin has decided to e.g. modify resource requests/limits.

If the image in the template comes from another repository (e.g. a custom-built tooling image) no changes are made.

Also updates the Makefile:

What issues does this PR fix or reference?

Resolves https://issues.redhat.com/browse/WTO-209

Is it tested? How?

To test:

  1. Install Web Terminal Operator in a cluster
  2. Update web-terminal-tooling and web-terminal-exec DevWorkspaceTemplates to have web-terminal.redhat.com/unmanaged-state: "true" annotation, and change image to e.g. the 1.7 tag instead of the default digest value
  3. Update the WTO CSV to set the operator's image to quay.io/amisevsk/web-terminal-operator:update-unmanaged
  4. Verify (in logs and in dwts) that images are updated back to the current digest for tooling/exec when controller container restarts.