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

operator: fix upgradeImages #1865

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hj-johannes-lee
Copy link
Contributor

@hj-johannes-lee hj-johannes-lee commented Oct 4, 2024

Operatorhub bundle can have sha256 image tags that are put through env vars. When operator controller manager gets upgraded, its operands (plugin daemonsets) should be updated to the image in the env vars. But it has not been working properly because of wrong parsing.

Fix it to parse the image names that have sha256 tags correctly so env vars in operator can be used as intended.

@mythi
Copy link
Contributor

mythi commented Oct 4, 2024

For sha256 image tags, it has not been working properly.

Can you write how you expect it to work and how it works now. IIRC we decided SHA pinning is only for the env var approach.

@hj-johannes-lee
Copy link
Contributor Author

hj-johannes-lee commented Oct 4, 2024

If image is intel-qat-plugin@sha256:69858421d6abd38867f61844db2c3fa7275bf6c089efd547e7de98dfc0c90a1a

Before:
name was intel-qat-plugin@sha256
and upgradeImage was not working even though envVar is properly set.

For example, let's say there is 0.30.0 version of deployed operatorhub bundle using olm (as written in the link), and then let's say we deploy a qat plugin (0.30.0 version).
And then we update the bundle with the comamnd:

operator-sdk run bundle-upgrade intel/intel-deviceplugins-operator:0.31.0

Then, the qat-plugin is expected to be upgraded automatically according to the envVar, but it does not because the parsing has been wrong (intel-qat-plugin@sha256)

So,
I expect name to be intel-qat-plugin so that it can be updated when another sha256 is found from envVar.
And it works now like that, and tested with olm.

IIRC we decided SHA pinning is only for the env var approach.

Yeah, this fix is for fixing the misimplementation with env var approach.
Maybe I need to make the commit message more clear.

Operatorhub bundle can have sha256 image tags that are put through
env vars. When operator controller manager gets upgraded, its
operands (plugin daemonsets) should be updated to the image in the
env vars. But it has not been working properly because of wrong
parsing.

Fix it to parse the image names that have sha256 tags correctly so
env vars in operator can be used as intended.

Signed-off-by: Hyeongju Johannes Lee <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants