Skip to content
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
21 changes: 21 additions & 0 deletions .github/actions/setup-apparmor/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Set up AppArmor for bink
description: Remove runner profiles that block bwrap and passt

runs:
using: composite
steps:
- name: Remove restrictive profiles
shell: bash
run: |
sudo systemctl disable --now apparmor 2>/dev/null || true
sudo aa-teardown 2>/dev/null || true
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
if sudo test -r /sys/kernel/security/apparmor/profiles && \
sudo grep -Eq '^(unpriv_bwrap|passt) ' /sys/kernel/security/apparmor/profiles; then
echo 'AppArmor still has a profile that blocks bink builds or tests' >&2
exit 1
fi
if [ "$(sysctl -n kernel.apparmor_restrict_unprivileged_userns)" != 0 ]; then
echo 'AppArmor still restricts unprivileged user namespaces' >&2
exit 1
fi
10 changes: 3 additions & 7 deletions .github/actions/setup-bink/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ runs:
- name: Configure kernel for nested containers
shell: bash
run: |
sudo systemctl disable --now apparmor 2>/dev/null || true
sudo aa-teardown 2>/dev/null || true
echo "AppArmor status after teardown:"
sudo aa-status 2>/dev/null || echo "(aa-status failed)"
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Expand All @@ -52,8 +47,9 @@ runs:
libbtrfs-dev \
libdevmapper-dev \
pkg-config
# passt's postinst reloads its AppArmor profile in enforce mode; remove it
sudo aa-teardown 2>/dev/null || true

- name: Set up AppArmor
uses: ./.github/actions/setup-apparmor

- name: Set up KVM
shell: bash
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
node-images:
- 'node-images/fedora/**'
- '.github/workflows/integration-tests.yml'
- '.github/actions/setup-apparmor/**'

supported-versions:
runs-on: ubuntu-latest
Expand All @@ -64,7 +65,7 @@ jobs:
id: set-matrix
run: |
DEFAULT="1.36"
FEDORA_VERSION="44"
FEDORA_VERSION="45"
# TODO: check how to configure renovate to update this list automatically
ALL='["1.37", "1.36", "1.35"]'
NON_DEFAULT=$(echo "$ALL" | jq -c --arg default "$DEFAULT" 'map(select(. != $default))')
Expand Down Expand Up @@ -98,6 +99,9 @@ jobs:
sudo chmod 666 /dev/kvm
ls -la /dev/kvm

- name: Set up AppArmor
uses: ./.github/actions/setup-apparmor

- name: Start local registry
run: sudo podman run -d -p 5000:5000 --name registry docker.io/library/registry:2

Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-container-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency:
env:
BINK_RUNTIME_IMAGES: >-
ghcr.io/bootc-dev/bink/cluster:latest
ghcr.io/bootc-dev/bink/node:v1.35-fedora-44-disk
ghcr.io/bootc-dev/bink/node:v1.36-fedora-44-disk
ghcr.io/bootc-dev/bink/dns:latest

jobs:
Expand All @@ -37,8 +37,6 @@ jobs:

- name: Configure kernel for nested containers
run: |
sudo aa-teardown 2>/dev/null || true
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Expand All @@ -47,6 +45,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y podman

- name: Set up AppArmor
uses: ./.github/actions/setup-apparmor

- name: Configure Podman
run: |
podman --version
Expand Down Expand Up @@ -106,7 +107,7 @@ jobs:
run: sudo make build-bink-image

- name: Test nested mode
run: sudo -E hack/test-container-image.sh nested
run: sudo env IMAGE_CACHE_DIR="$IMAGE_CACHE_DIR" hack/test-container-image.sh nested
timeout-minutes: 40
env:
IMAGE_CACHE_DIR: /tmp/podman-image-cache
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build environment for bink CLI with all C dependencies
ARG FEDORA_VERSION=44
ARG FEDORA_VERSION=45
FROM quay.io/fedora/fedora:${FEDORA_VERSION} AS builder

# Install Go and required C libraries for Podman bindings
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ update-calico:
@echo "✅ Updated $(CALICO_MANIFEST)"

# Test targets
GINKGO := go run github.com/onsi/ginkgo/v2/ginkgo
GINKGO := go tool ginkgo
TEST_PROCS ?= 3
GINKGO_FOCUS ?=
GINKGO_FOCUS_FLAG := $(if $(GINKGO_FOCUS),--focus="$(GINKGO_FOCUS)",)
Expand Down
2 changes: 1 addition & 1 deletion containerfiles/cluster-image/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG FEDORA_VERSION=44
ARG FEDORA_VERSION=45
FROM quay.io/fedora/fedora:${FEDORA_VERSION}

RUN dnf install -y --setopt=install_weak_deps=0 \
Expand Down
2 changes: 1 addition & 1 deletion containerfiles/dns/Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG FEDORA_VERSION=44
ARG FEDORA_VERSION=45
FROM registry.fedoraproject.org/fedora-minimal:${FEDORA_VERSION}

RUN microdnf install -y dnsmasq && microdnf clean all
Expand Down
56 changes: 29 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/bootc-dev/bink

go 1.26.8
go 1.27.3

require (
github.com/google/uuid v1.6.0
Expand All @@ -11,9 +11,9 @@ require (
github.com/spf13/cobra v1.10.2
github.com/spf13/viper v1.21.0
go.podman.io/common v0.70.0
go.podman.io/podman/v6 v6.1.4
golang.org/x/crypto v0.58.0
golang.org/x/term v0.47.0
go.podman.io/podman/v6 v6.2.0
golang.org/x/crypto v0.59.0
golang.org/x/term v0.48.0
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.37.2
k8s.io/apimachinery v0.37.2
Expand Down Expand Up @@ -55,36 +55,36 @@ require (
github.com/docker/docker-credential-helpers v0.9.12 // indirect
github.com/docker/go-connections v0.8.2 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/emicklei/go-restful/v3 v3.14.0 // indirect
github.com/emicklei/go-restful/v3 v3.13.0 // indirect
github.com/felixge/httpsnoop v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.10.1 // indirect
github.com/fsouza/go-dockerclient v1.13.3 // indirect
github.com/fxamacker/cbor/v2 v2.10.0 // indirect
github.com/go-jose/go-jose/v4 v4.1.7 // indirect
github.com/go-jose/go-jose/v4 v4.1.9 // indirect
github.com/go-logr/logr v1.4.4 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v1.0.2 // indirect
github.com/go-openapi/jsonreference v1.0.3 // indirect
github.com/go-openapi/swag v0.29.2 // indirect
github.com/go-openapi/swag/cmdutils v0.29.2 // indirect
github.com/go-openapi/swag v0.28.0 // indirect
github.com/go-openapi/swag/cmdutils v0.28.0 // indirect
github.com/go-openapi/swag/conv v0.29.2 // indirect
github.com/go-openapi/swag/fileutils v0.29.2 // indirect
github.com/go-openapi/swag/fileutils v0.28.0 // indirect
github.com/go-openapi/swag/jsonutils v0.29.2 // indirect
github.com/go-openapi/swag/loading v0.29.2 // indirect
github.com/go-openapi/swag/mangling v0.29.2 // indirect
github.com/go-openapi/swag/netutils v0.29.2 // indirect
github.com/go-openapi/swag/loading v0.28.0 // indirect
github.com/go-openapi/swag/mangling v0.28.0 // indirect
github.com/go-openapi/swag/netutils v0.28.0 // indirect
github.com/go-openapi/swag/pools v0.29.2 // indirect
github.com/go-openapi/swag/stringutils v0.29.2 // indirect
github.com/go-openapi/swag/stringutils v0.28.0 // indirect
github.com/go-openapi/swag/typeutils v0.29.2 // indirect
github.com/go-openapi/swag/yamlutils v0.29.2 // indirect
github.com/go-openapi/swag/yamlutils v0.28.0 // indirect
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/godbus/dbus/v5 v5.2.4 // indirect
github.com/google/gnostic-models v0.7.1 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/go-containerregistry v0.22.1 // indirect
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/pprof v0.0.0-20261026192309-dbd0ed30aa88 // indirect
github.com/google/pprof v0.0.0-20261105003125-4bf881d7fb0b // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/schema v1.4.1 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
Expand All @@ -99,10 +99,10 @@ require (
github.com/kr/fs v0.1.0 // indirect
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-runewidth v0.0.31 // indirect
github.com/mattn/go-sqlite3 v1.14.52 // indirect
github.com/mattn/go-sqlite3 v1.14.53 // indirect
github.com/miekg/pkcs11 v1.1.2 // indirect
github.com/mistifyio/go-zfs/v4 v4.0.0 // indirect
github.com/moby/buildkit v0.34.1 // indirect
github.com/moby/buildkit v0.34.2 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/go-archive v0.3.3 // indirect
github.com/moby/moby/api v1.56.1 // indirect
Expand Down Expand Up @@ -140,7 +140,7 @@ require (
github.com/smallstep/pkcs7 v0.2.3 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/pflag v1.1.0 // indirect
github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/sylabs/sif/v2 v2.24.2 // indirect
Expand All @@ -162,20 +162,20 @@ require (
go.opentelemetry.io/otel/metric v1.47.0 // indirect
go.opentelemetry.io/otel/trace v1.47.0 // indirect
go.podman.io/buildah v1.46.0 // indirect
go.podman.io/image/v5 v5.42.0 // indirect
go.podman.io/storage v1.65.0 // indirect
go.podman.io/image/v5 v5.42.1 // indirect
go.podman.io/storage v1.65.1 // indirect
go.yaml.in/yaml/v2 v2.4.4 // indirect
go.yaml.in/yaml/v3 v3.0.6 // indirect
golang.org/x/mod v0.42.0 // indirect
golang.org/x/net v0.62.0 // indirect
golang.org/x/oauth2 v0.37.0 // indirect
golang.org/x/sync v0.24.0 // indirect
golang.org/x/sys v0.49.0 // indirect
golang.org/x/text v0.43.0 // indirect
golang.org/x/sync v0.25.0 // indirect
golang.org/x/sys v0.50.0 // indirect
golang.org/x/text v0.44.0 // indirect
golang.org/x/time v0.16.0 // indirect
golang.org/x/tools v0.52.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261026165753-2ffab32bce7e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261026165753-2ffab32bce7e // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20261104224025-d1e00e9f33ab // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab // indirect
google.golang.org/grpc v1.85.0 // indirect
google.golang.org/protobuf v1.36.12 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
Expand All @@ -184,9 +184,11 @@ require (
k8s.io/klog/v2 v2.140.0 // indirect
k8s.io/kube-openapi v0.0.0-20260721132016-d427ff9ee9ad // indirect
k8s.io/streaming v0.37.2 // indirect
k8s.io/utils v0.0.0-20260626114624-be93311217bd // indirect
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect
k8s.io/utils v0.0.0-20261023123148-ca04ba58ecab // indirect
sigs.k8s.io/json v0.0.0-20260909141634-11ed52e25bc5 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect
tags.cncf.io/container-device-interface v1.1.1 // indirect
)

tool github.com/onsi/ginkgo/v2/ginkgo
Loading
Loading