-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add digest reference to KubeVirt image description #46
Conversation
In the current design, the KubeVirt image is presumed to be a fully- qualified reference, including a container digest. But that implies that the user should reference the image by digest, when we'd prefer that they reference it by stream-specific tag. Define the existing "image" field to contain the preferred form of fully-qualified reference for the image, which might involve either a tag or a digest. We should still record the unique identifier of the current image (as we do for GCP images), so add a "digest-ref" field which always contains a fully-qualified reference with digest.
I did not want to go too much into detail on the comment in coreos/fedora-coreos-pipeline#515 (comment), but I don't think this goes in the direction I intended. I intentianally only planned to provide a full qualified image reference with I think there is a difference between downloading a fresh image from a well know location and using a container image registry. In contrast to a download location, an image reference can directly used on real workloads. As such, using tags (especially moving ones) is definitely not what anyone should do and normally does. What may be missing is a way in Just to better explain the rationale behind not using
That does however not contradict the idea of updating fast, it just means that one has to do additional steps to pick up changes from fast-releasing upstream which brings potential CVE fixes:
For the image stream metadata a tag does not provide any additional benefit to tha digest, because the stream info already references the artifact in a fully compatible and most exact way. A fresh fcos build would belong to a new stream file. Sorry for the rather long response, but I wanted to at least have mentioned this in detail. Let me know what you think. |
@rmohr One of the main benefits of Fedora CoreOS is that it updates automatically. Users should be able to think of the OS as an appliance, and its version as an implementation detail: it exists, but they shouldn't need to pay attention to it. We do not support or recommend running old releases, since they don't contain the latest security updates and other important fixes. As to testing: the recommended strategy for all users is to run a few Thus, our recommendation for KubeVirt users is the same as our recommendation on all other platforms: always launch the latest release. The implementation varies by platform though. For example:
For the KubeVirt ContainerDisk, we're lucky to have a mechanism (image tags) that allows users to pull the latest image at launch time, without needing to manually query stream metadata for the latest ref. Therefore, we should emphasize it. The image digest will still be included in the stream metadata for those who nevertheless choose to pin a release. To be clear, all of this applies specifically to FCOS. In RHCOS, the OpenShift installer pins the bootimage version that should be used. This PR defines the |
Exactly. I think this is the key piece of the model that allows us to "follow latest" and still achieve all the sames goals that @rmohr mentioned in #46 (comment). @rmohr in short, people can get still get all the qualification that they would be doing with the steps laid out in the last set of bullet points from #46 (comment) but they just do it on the |
I think along with the strategy for openshift/enhancements#1032 we are going to be offering more flexibility to users of OCP/RHCOS, so I wouldn't necessarily assume that FCOS is always floating and RHCOS is always pinned. I think basically we want to offer both tags and digested pull specs for both. Now, this thread heavily intersects with the GC policy issue - we haven't addressed that yet. |
Since I am still not 100% sure that all implications are clear, here a few cases where people using a floating tag will run into unexpected downtime on their services in their k8s cluster. It is really crucial for me that we all talk about the same things, and that these side-effects are "wanted/expected":
Let me know if you see theses as potential issues. |
Thanks for the concrete examples.
If you're in this situation, one of a couple things has happened: either your code has been failing in
It's not solely your responsibility to diagnose OS regressions. Report the problem to us; we can and do revert/pin packages until problems can be fixed.
Again, this implies that you aren't testing on
If this is a canary rollout of your app, you can still roll back to the previous fixed tag. If it's a canary rollout of the host OS, and you can't do an on-node rollback (i.e., you're rolling out fresh nodes rather than upgrading in place), then yes, at that point you'll need to switch to a tag reference. But this also implies that the
If the new version of the OS has forward- and backward-incompatible changes, report those to us, since we're careful to avoid those. If the goal is just to take advantage of new functionality added in an OS release, then as long as you've waited 48-72 hours after a stable release before depending on any new behavior, all of your nodes should have automatically updated themselves to the new version. I think part of the mismatch here is: you're thinking about the advanced case and we're thinking about the common case. If your cluster carefully controls the versions of your host OS, CIs everything together, and does frequent rollouts of host nodes, you may well decide to pin to version tags or image digests and have the cluster manage OS versions directly. The stream metadata will still provide enough information for you to do so. (In that case you should also turn off Zincati.) But in many cases, users are tempted to just pin to a random OS version and walk away, leaving their systems insecure in the long run. For those users, we provide an alternative model that still keeps their systems up to date. |
Alright. Seems like all implications are well understood :) Thanks for the detailed response. |
We're not currently setting all the fields of the `kubevirt` image in release metadata. Notably as per earlier discussions[[1]][[2]], we want the `image` field to use a floating tag and the `digest-ref` field to use a digest pullspec. Determining the floating tag to use is a bit hacky right now, but safe: we find in the list of pushed tags the one which doesn't have a build ID reference to it. If we find multiple, we fail. In the future, we'll probably want to strengthen this to be more explicit. [1]: coreos/stream-metadata-go#46 [2]: coreos/fedora-coreos-tracker#1172 Closes: coreos#3456
We're not currently setting all the fields of the `kubevirt` image in release metadata. Notably as per earlier discussions[[1]][[2]], we want the `image` field to use a floating tag and the `digest-ref` field to use a digest pullspec. Determining the floating tag to use is a bit hacky right now, but safe: we find in the list of pushed tags the one which doesn't have a build ID reference to it. If we find multiple, we fail. In the future, we'll probably want to strengthen this to be more explicit. [1]: coreos/stream-metadata-go#46 [2]: coreos/fedora-coreos-tracker#1172 Closes: #3456
In the current design, the KubeVirt image is presumed to be a fully-qualified reference, including a container digest. But that implies that the user should reference the image by digest, when we'd prefer that they reference it by stream-specific tag.
Define the existing
image
field to contain the preferred form of fully-qualified reference for the image, which might involve either atag or a digest. We should still record the unique identifier of the current image (as we do for GCP images), so add a
digest-ref
field which always contains a fully-qualified reference with digest.cc @rmohr @dustymabe