-
Notifications
You must be signed in to change notification settings - Fork 17
chore(base-image): Migrate builds to UBI9/RHEL9 #2562
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
Open
davdhacs
wants to merge
18
commits into
master
Choose a base branch
from
konflux-ubi9-rhel9-migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
1a70218
chore(build): Migrate scanner images to UBI9/RHEL9
davdhacs b3addf3
fix: Add update-ca-trust workaround for unprivileged containers
davdhacs 46d33f6
empty commit
davdhacs 1ec1ed6
Merge remote-tracking branch 'origin/master' into konflux-ubi9-rhel9-…
davdhacs 64b335a
Merge remote-tracking branch 'origin/master' into konflux-ubi9-rhel9-…
davdhacs f65ee67
Merge remote-tracking branch 'origin/master' into konflux-ubi9-rhel9-…
davdhacs 605a8e1
fix: Align CA trust setup with stackrox/stackrox PR #19454
davdhacs ea5e1fe
Merge branch 'master' into konflux-ubi9-rhel9-migration
davdhacs 0bbcdeb
Merge remote-tracking branch 'origin/master' into konflux-ubi9-rhel9-…
davdhacs f48b1c7
Merge branch 'konflux-ubi9-rhel9-migration' of github.com:stackrox/sc…
davdhacs d795c42
Merge branch 'konflux-ubi9-rhel9-migration' of github.com:stackrox/sc…
davdhacs d285ba8
Merge branch 'konflux-ubi9-rhel9-migration' of github.com:stackrox/sc…
davdhacs 8222ac2
restore before refactor
davdhacs 6f8d323
Merge branch 'master' into konflux-ubi9-rhel9-migration
davdhacs ae9b8ec
refactor: Consolidate CA trust setup into import-additional-cas (#2991)
davdhacs 8ef8573
Merge branch 'master' into konflux-ubi9-rhel9-migration
davdhacs 8598672
Merge remote-tracking branch 'origin/master' into konflux-ubi9-rhel9-…
davdhacs 8838582
Merge branch 'konflux-ubi9-rhel9-migration' of github.com:stackrox/sc…
davdhacs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,5 @@ set -euo pipefail | |
|
|
||
| /restore-all-dir-contents | ||
| /import-additional-cas | ||
| /trust-root-ca | ||
|
|
||
| exec /scanner | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,16 +7,37 @@ set -euo pipefail | |
| # kubernetes secret volume mount process. | ||
| copy_existing () { | ||
| src=$1 | ||
| echo "Looking for certificates in '$src'" | ||
| if [ -d "$src" ] && [ "$(ls -A -I "..*" "$src")" ]; then | ||
| cp -v -L "$src"/* /etc/pki/ca-trust/source/anchors | ||
| else | ||
| echo "No certificates found in $src" | ||
| fi | ||
| } | ||
|
|
||
| echo "Setting up CA trust store in container" | ||
|
|
||
| copy_existing /usr/local/share/ca-certificates | ||
|
|
||
| # Copy the custom trusted CA bundles injected by the Openshift Network Operator. | ||
| copy_existing /etc/pki/injected-ca-trust | ||
|
|
||
| update-ca-trust extract | ||
| # Copy the StackRox root CA if available (mounted by the operator). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I don't quite follow, how is this |
||
| # Only copy ca.pem — the mount also contains server cert and key which | ||
| # should not be added as trusted CA anchors. | ||
| CA_PATH="/run/secrets/stackrox.io/certs/ca.pem" | ||
| echo "Copying StackRox root CA from '${CA_PATH}'" | ||
| # For RHEL | ||
| cp "${CA_PATH}" /etc/pki/ca-trust/source/anchors/root-ca.pem | ||
|
|
||
| echo "Updating CA trust" | ||
| # Though /etc/pki/ca-trust/extracted is the default output, update-ca-trust | ||
| # will create the necessary directories with the required permissions if the `--output` flag is used. | ||
| # See https://bugzilla.redhat.com/show_bug.cgi?id=2241240 for background. | ||
| # | ||
| # tl,dr: update-ca-trust extract, when giving the `--output` flag behaves differently with respect | ||
| # to filesystem permissions and this is the behaviour we need for containerized environments. | ||
| update-ca-trust extract --output /etc/pki/ca-trust/extracted | ||
|
|
||
| echo "Done setting up CA trust store in container" | ||
| echo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this
update-ca-trustrelated code reorganization required somehow by the migmration to UBI9?