Skip to content

Commit

Permalink
Merge branch 'main' into nov24-ppc64le-support
Browse files Browse the repository at this point in the history
  • Loading branch information
pranitaT authored Jan 30, 2025
2 parents 3652d29 + 08695e5 commit ed1dd7e
Show file tree
Hide file tree
Showing 442 changed files with 16,349 additions and 15,261 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/helm-chart-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.7
python-version: 3.13

- name: Set up chart-testing
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/olm_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
env:
GO_VERSION: '1.23'
KIND_IMG_TAG: v1.31.2
KIND_IMG_TAG: v1.32.0
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install dependencies
run: sudo hack/install-packages
- run: make test-unit
- uses: codecov/codecov-action@7f8b4b4bde536c465e797be725718b88c5d95e0e # v5.1.1
- uses: codecov/codecov-action@1e68e06f1dbfde0e4cefc87efeba9e4643565303 # v5.1.2
with:
files: build/coverage.out
flags: unittests
Expand Down
7 changes: 5 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ linters:
- errname
- errorlint
- exhaustive
- exptostd
- fatcontext
- forcetypeassert
- gci
Expand Down Expand Up @@ -66,7 +67,9 @@ linters:
- nakedret
- nestif
- nilerr
- nilnesserr
- nilnil
- nlreturn
- noctx
- nolintlint
- nosprintfhostport
Expand Down Expand Up @@ -97,8 +100,10 @@ linters:
- unparam
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
- wsl
- zerologlint
# - cyclop
# - depguard
Expand All @@ -113,12 +118,10 @@ linters:
# - ireturn
# - maintidx
# - mnd
# - nlreturn
# - nonamedreturns
# - testpackage
# - varnamelen
# - wrapcheck
# - wsl
linters-settings:
revive:
rules:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# for more details

# hash below referred to latest
FROM registry.access.redhat.com/ubi8/go-toolset@sha256:3494f435c2f573bdb7ed4d59eadc7ec9dde3e088907de5cd6f2fdf4a57206615 AS build
FROM registry.access.redhat.com/ubi8/go-toolset@sha256:9b7b1a47d31de7c15966a1c63141f985d8c0b100a768ece74c5a7262dc0e6e27 AS build
USER root
WORKDIR /work

Expand All @@ -45,7 +45,7 @@ ARG STATIC_LINK=no
RUN make

# hash below referred to latest
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:dee813b83663d420eb108983a1c94c614ff5d3fcb5159a7bd0324f0edbe7fca1
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:b87097994ed62fbf1de70bc75debe8dacf3ea6e00dd577d74503ef66452c59d6
ARG version
USER root

Expand Down
31 changes: 17 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

GO ?= go

GOLANGCI_LINT_VERSION = v1.62.0
GOLANGCI_LINT_VERSION = v1.63.4
REPO_INFRA_VERSION = v0.2.5
KUSTOMIZE_VERSION = 5.5.0
OPERATOR_SDK_VERSION ?= v1.37.0
Expand Down Expand Up @@ -88,7 +88,9 @@ endif
export CGO_LDFLAGS
export CGO_ENABLED=1

BUILD_FILES := $(shell find . -type f -name '*.go' -or -name '*.mod' -or -name '*.sum' -not -name '*_test.go')
BUILD_FILES := $(shell find . -type f -name '*.go' -or -name '*.mod' -or -name '*.sum' -or -name 'recorder.bpf.o.*' -not -name '*_test.go')
BPF_FILES := $(shell find internal/pkg/daemon/bpfrecorder/bpf -type f -name '*.c' -or -name '*.h')
BPF_OUTPUT_FILES := $(shell find internal/pkg/daemon/bpfrecorder/bpf -type f -name 'recorder.bpf.o.*')
export GOFLAGS?=-mod=vendor
GO_PROJECT := sigs.k8s.io/$(PROJECT)
LDVARS := \
Expand Down Expand Up @@ -160,7 +162,7 @@ $(BUILD_DIR)/$(CLI_BINARY): $(BUILD_DIR) $(BUILD_FILES)

.PHONY: clean
clean: ## Clean the build directory
rm -rf $(BUILD_DIR)
rm -rf $(BUILD_DIR) $(BPF_OUTPUT_FILES)

.PHONY: $(BUILD_DIR)/kustomize
$(BUILD_DIR)/kustomize: $(BUILD_DIR)
Expand Down Expand Up @@ -341,17 +343,18 @@ update-vmlinux: ## Generate the vmlinux.h required for building the BPF modules.
./hack/update-vmlinux

.PHONY: update-btf
update-btf: update-bpf ## Build and update all generated BTF code for supported kernels
./hack/update-btf
update-btf: $(BUILD_DIR) ## Build and update all generated BTF code for supported kernels
$(GO) run ./internal/pkg/daemon/bpfrecorder/generate

.PHONY: update-bpf
update-bpf: $(BUILD_DIR) ## Build and update all generated BPF code with nix
for arch in amd64 arm64; do \
nix-build nix/default-bpf-$$arch.nix ;\
cp -f result/recorder.bpf.o $(BUILD_DIR)/recorder.bpf.o.$$arch ;\
done
chmod 0644 $(BUILD_DIR)/recorder.bpf.o.*
$(GO) run ./internal/pkg/daemon/bpfrecorder/generate
update-bpf: clean \
internal/pkg/daemon/bpfrecorder/bpf/recorder.bpf.o.amd64 \
internal/pkg/daemon/bpfrecorder/bpf/recorder.bpf.o.arm64

internal/pkg/daemon/bpfrecorder/bpf/recorder.bpf.o.%: $(BPF_FILES) ## Build and update all generated BPF code with nix
nix-build nix/default-bpf-$*.nix
cp -f result/recorder.bpf.o ./internal/pkg/daemon/bpfrecorder/bpf/recorder.bpf.o.$*
chmod 0644 ./internal/pkg/daemon/bpfrecorder/bpf/recorder.bpf.o.$*

# Verification targets

Expand Down Expand Up @@ -468,7 +471,7 @@ test-unit: $(BUILD_DIR) ## Run the unit tests
test-e2e: ## Run the end-to-end tests
CGO_LDFLAGS= \
E2E_SKIP_FLAKY_TESTS=true \
$(GO) test -parallel 1 -timeout 60m -count=1 ./test -v
$(GO) test -parallel 1 -timeout 60m -count=1 ./test -v $(ARGS)

.PHONY: test-flaky-e2e
test-flaky-e2e: ## Only run the flaky end-to-end tests
Expand All @@ -478,7 +481,7 @@ test-flaky-e2e: ## Only run the flaky end-to-end tests

.PHONY: test-spoc-e2e
test-spoc-e2e: build/spoc
$(GO) test -v ./test/spoc
$(GO) test -v ./test/spoc $(ARGS)

# Generate CRD manifests
manifests: $(BUILD_DIR)/kubernetes-split-yaml $(BUILD_DIR)/kustomize
Expand Down
2 changes: 1 addition & 1 deletion api/apparmorprofile/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ed1dd7e

Please sign in to comment.