Skip to content

Fix CRI-O related runtime binary path #2361

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion hack/ci/Vagrantfile-fedora
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ gpgkey=https://pkgs.k8s.io/addons:/cri-o:/prerelease:/main/rpm/repodata/repomd.x
EOF

dnf install -y \
cri-o \
conntrack \
container-selinux \
gcc \
Expand All @@ -72,6 +71,11 @@ EOF
openssl \
podman

# conmon installs to /usr/libexec/crio/conmon
# https://github.com/containers/conmon/issues/517
dnf download --repo cri-o --arch x86_64 cri-o
rpm -i --nodeps --force cri-o-*.rpm

# Load the prebuilt container image
podman load -i /vagrant/image.tar

Expand Down
7 changes: 5 additions & 2 deletions hack/ci/e2e-seccomp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ record_seccomp_profiles() {
k apply -f examples/profilerecording-seccomp-bpf.yaml

RUNTIMES=(runc crun)
# Default location for CRI-O specific runtime binaries
export PATH="/usr/libexec/crio:$PATH"

for RUNTIME in "${RUNTIMES[@]}"; do
echo "For runtime $RUNTIME"
BASEPROFILE=examples/baseprofile-$RUNTIME.yaml
Expand Down Expand Up @@ -88,7 +91,7 @@ EOT
)" "$BASEPROFILE"

echo "Getting runtime version"
VERSION=$(crio-"$RUNTIME" --version | grep "$RUNTIME version" | grep -oP '\d+.*')
VERSION=$("$RUNTIME" --version | grep "$RUNTIME version" | grep -oP '\d+.*')
yq -i '.metadata.name = "'"$RUNTIME"'-v'"$VERSION"'"' "$BASEPROFILE"

echo "Deleting seccomp profile"
Expand All @@ -100,7 +103,7 @@ EOT

for RUNTIME in "${RUNTIMES[@]}"; do
echo "Verifying that the profile for runtime $RUNTIME is available in the GitHub container registry"
VERSION=$(crio-"$RUNTIME" --version | grep "$RUNTIME version" | grep -oP '\d+.*')
VERSION=$("$RUNTIME" --version | grep "$RUNTIME version" | grep -oP '\d+.*')
cosign verify --certificate-identity-regexp '.*' --certificate-oidc-issuer-regexp '.*' \
"ghcr.io/security-profiles/$RUNTIME:v$VERSION"
done
Expand Down
Loading