You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "squakez (via GitHub)" <gi...@apache.org> on 2024/12/10 07:28:30 UTC
[I] Use base image SHA instead of tag [camel-k]
squakez opened a new issue, #5986:
URL: https://github.com/apache/camel-k/issues/5986
### Requirement
We're actually using a tag to start the image building process. It would be convenient to get the SHA of the image in order to have a fully reproducible build.
### Problem
a
### Proposal
_No response_
### Open questions
_No response_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3839733942
That's correct. We probably need to identify the different places where the variable is used and change it statically. I think that having the dependabot managing an upgrade may be complicated because the dependency is scattered around the code and scripts. Great idea to update the `Makefile`. We alreay have a `make generate` (which it also happen on autogen at night time) where you can just include the new SHA mapping script.
Right now we are controlling that value via a variable in https://github.com/apache/camel-k/blob/60925a32d1dbea892e1e50c8089e3b9e55835ecb/script/Makefile#L53C36-L53C54
We should introduce a new variable containing such a SHA. With this new variable we only control the Integration base image. This variable is the one which we can change via this new script, only changing the value in the Makefile in https://github.com/apache/camel-k/blob/60925a32d1dbea892e1e50c8089e3b9e55835ecb/script/Makefile#L191.
About the documentation, you can just change the format and include a bogus value. I don't see any value in doing the update there, as the user have to look and change it anyway.
Feel free to ping me or just open a draft PR to include any further detail, but I think the plan is quite good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3301568248
Great! Feel free to ask. As an hint, you can notice a warning during the building process in Jib as we use an image with a tag. I think we should try to figure it out how to convert that into a reproducible build instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "michalvavrik (via GitHub)" <gi...@apache.org>.
michalvavrik commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3831919235
I can reproduce it when running `e2e/common/traits/builder_test.go` by printing JIB container logs. I'll try to use `github.com/google/go-containerregistry/pkg/v1/remote` to resolve the image digest when not present. I'll do it automatically, without some options to enable / disable it I guess, or without any storing of the previous resolved digest (caching). It shouldn't be dangerous as if we fail to resolve the SHA, we just fallback to the tag, so the only "downside" would be that remote call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3835630552
Thanks for having a look @michalvavrik. We had abandoned the `go-containerregistry` when dropping the support of "Spectrum" project. We are all in with Jib as a publishing mechanism. Pinging the registry is something that I'd avoid as it may require authentication and any other complications which will come for sure.
We may think to simply include the SHA statically and the user to update it via IntegrationPlatform update mechanism. This one guarantee reproducibility and the possibility to easily upgrade the image sha on the fly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "squakez (via GitHub)" <gi...@apache.org>.
squakez closed issue #5986: Use base image SHA instead of tag
URL: https://github.com/apache/camel-k/issues/5986
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "michalvavrik (via GitHub)" <gi...@apache.org>.
michalvavrik commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3300252123
I'd like to give it try and implement this. I may need some pointers as I am not quite sure where to start. I'll figure this week if all is clear or I have concrete questions regarding the issue description.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-2712146259
This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Use base image SHA instead of tag [camel-k]
Posted by "michalvavrik (via GitHub)" <gi...@apache.org>.
michalvavrik commented on issue #5986:
URL: https://github.com/apache/camel-k/issues/5986#issuecomment-3836982361
> Thanks for having a look @michalvavrik. We had abandoned the go-containerregistry when dropping the support of "Spectrum" project. We are all in with Jib as a publishing mechanism. Pinging the registry is something that I'd avoid as it may require authentication and any other complications which will come for sure.
That's helpful @squakez , thank you. Please allow me to clarify as I am slow, so that I don't "implement" something differently and waste time.
> We may think to simply include the SHA statically and the user to update it via IntegrationPlatform update mechanism. This one guarantee reproducibility and the possibility to easily upgrade the image sha on the fly.
The way I understand this is that it is already possible to specify base image either via `KAMEL_BASE_IMAGE` env var or in IntegrationPlatform via `spec.build.baseImage`. So by _include the SHA statically_ you mean:
- change `KAMEL_BASE_IMAGE` default value to `eclipse-temurin:17-jdk@sha256:some-hardcoded-sha`
- make sure that dependabot automatically updates the SHA so that with each release Camel-K provides updated base image (to avoid CVEs)
If I understood you right, then I can update the `.github/actions/automatic-updates/action.yml` with check for a new SHA and if detected, I can update `Makefile`, e.g. with `sed` command I'll replace value of newly introduced `BASE_IMAGE_SHA`. The only issue I can see is that `docs/modules/ROOT/pages/installation/advanced/advanced.adoc` contains:
```
|`KAMEL_BASE_IMAGE`
|`eclipse-temurin:17-jdk`
```
so I'd have to change it something like `eclipse-temurin:17-jdk@sha256:example-image-sha`. I could write a script that updates it, but not sure if it is worth it as it would add bit more complexity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org