Skip to content

feat(BuildStrategy): use flag to activate insecure registries - #1359

Open
sgaist wants to merge 7 commits into
mainfrom
refactor/improve-insecure-registry-handling
Open

feat(BuildStrategy): use flag to activate insecure registries#1359
sgaist wants to merge 7 commits into
mainfrom
refactor/improve-insecure-registry-handling

Conversation

@sgaist

@sgaist sgaist commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Describe your changes

The current implementation of "insecure registries" support for builds is automatically activated by default.

This PR changes that through the use of the shp-output-insecure output parameter from Shipwright.

Changes are twofold:

  • Update renku-data-services to use the new BUILD_INSECURE_OUTPUT_ENABLED environement variable
  • Update the BuildStrategy to make use of it
  • The list of insecure registries is now a proper list

This will also follow the Shipwright implementation more accurately.

The Renku admins can now enable/disable the use of insecure
registries through the BUILD_INSECURE_OUTPUT_ENABLED environment
variable.

This flag will be forwarded to Shipwright through the output
parameters.

The BuildStrategy now follows more closely the implementation
from Shipwright and respects that flag.
@sgaist
sgaist requested review from a team and SalimKayal as code owners June 22, 2026 14:54
@coveralls

coveralls commented Jun 22, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 28015495482

Coverage at 86.359% (no base build to compare)

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 5 of 5 lines across 3 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 31331
Covered Lines: 27057
Line Coverage: 86.36%
Coverage Strength: 1.5 hits per line

💛 - Coveralls

@sgaist
sgaist requested a review from olevski June 23, 2026 09:13
@olevski

olevski commented Jun 24, 2026

Copy link
Copy Markdown
Member

@sgaist what is the point of this? What does "insecure registries" mean exactly and what is it used for?

@leafty

leafty commented Jun 24, 2026

Copy link
Copy Markdown
Member

@sgaist what is the point of this? What does "insecure registries" mean exactly and what is it used for?

@olevski

This tells the buildpack lifecycle to not verify TLS certificates for specific registries (when pulling, pushing, etc.). See also conversation here: #1264 (review)

This setting can help test building images end-to-end where the registry is deployed in a non-production setup with certificates not attached to a PKI (self-signed).

@sgaist
sgaist requested a review from leafty June 24, 2026 09:33

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script part looks complex now, with argument parsing involved. Do we want to maintain this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea was to keep it close to the Shipwright implementation however I am not against keeping it simpler if you prefer.

We can move back to a single string containing the list of registries.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simplified it

Comment thread components/renku_data_services/session/config.py Outdated
Comment on lines +226 to +231
crs.ParamValue(
name="insecure-registries",
values=[
crs.Value(value=registry) for registry in params.insecure_registries.split(",")
],
),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: "".split(",") returns [""] will this be a problem?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will cause trouble further on into the strategy in the bash script in the yaml file.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should not however the BuildStrategy does not handle properly an empty value. Not that it fails but it will trigger the export of CNB_INSECURE_REGISTRIES with , as value.

I have refactored that part back to its original implementation as I have simplified the BuildStrategy as well.

Comment thread components/renku_pack_builder/manifests/buildstrategy.yaml Outdated
sgaist and others added 5 commits July 2, 2026 17:11
Co-authored-by: Tasko Olevski <16360283+olevski@users.noreply.github.com>
- Revert the last changes as setting insecure registries
and handling the output as insecure can be independent
(e.g. pulling dependencies VS pushing the output).

- Add a warning if the registry for the output image is
listed as insecure registries while the insecure output
option is disabled.

- Handle properly empty insecure registry list
…stries

The fact that the output shall go to an insecure registry
is a separate concern from secure registries providing items
for the build.
…dling

Some of the checks are now done directly in the configuration of
the feature so no need to make them again in the BuildStrategy.

The back and forth between string and list and then back to
string was not a good idea.
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.

4 participants