-
Notifications
You must be signed in to change notification settings - Fork 36
WIP: CORENET-7045: INFW K8s rebase to 1.36.1 #713
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| build_root_image: | ||
| name: release | ||
| namespace: openshift | ||
| tag: rhel-9-release-golang-1.25-openshift-4.22 | ||
| tag: rhel-9-release-golang-1.26-openshift-5.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| FROM golang:1.25 AS builder | ||
| FROM golang:1.26 AS builder | ||
|
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. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# List all FROM lines so pinned vs unpinned bases can be checked quickly
rg -n '^\s*FROM\s+' --iglob 'Dockerfile*'Repository: openshift/ingress-node-firewall Length of output: 750 Pin non-RH
🧰 Tools🪛 Trivy (0.69.3)[error] 1-1: Image user should not be 'root' Specify at least 1 USER command in Dockerfile with non-root user as argument Rule: DS-0002 (IaC/Dockerfile) 🤖 Prompt for AI Agents |
||
| WORKDIR /go/src/github.com/openshift/ingress-node-firewall | ||
| COPY . . | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder | ||
| FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder | ||
|
|
||
| WORKDIR /go/src/github.com/openshift/ingress-node-firewall | ||
| COPY . . | ||
| RUN ./hack/build-daemon.sh | ||
|
|
||
| FROM registry.ci.openshift.org/ocp/4.22:base-rhel9 | ||
| FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 | ||
| COPY --from=builder /go/src/github.com/openshift/ingress-node-firewall/bin/daemon /usr/bin/ | ||
| COPY --from=builder /go/src/github.com/openshift/ingress-node-firewall/bin/syslog /usr/bin/ | ||
| CMD ["/usr/bin/daemon"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
| # To re-generate a bundle for another specific version without changing the standard setup, you can: | ||
| # - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2) | ||
| # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) | ||
| VERSION ?= 4.22.0 | ||
| VERSION ?= 5.0.0 | ||
| CSV_VERSION = $(shell echo $(VERSION) | sed 's/v//') | ||
| ifeq ($(VERSION), latest) | ||
| CSV_VERSION := 0.0.0 | ||
|
|
@@ -57,7 +57,7 @@ endif | |
| IMG ?= quay.io/openshift/origin-ingress-node-firewall:latest | ||
| DAEMON_IMG ?= quay.io/openshift/origin-ingress-node-firewall-daemon:latest | ||
| # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. | ||
| ENVTEST_K8S_VERSION = 1.32.x | ||
| ENVTEST_K8S_VERSION = 1.36.0 | ||
|
|
||
| # Default namespace | ||
| NAMESPACE ?= ingress-node-firewall-system | ||
|
|
@@ -268,8 +268,8 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest | |
|
|
||
| ## Tool Versions | ||
| KUSTOMIZE_VERSION ?= v3.8.7 | ||
| CONTROLLER_TOOLS_VERSION ?= v0.20.1 | ||
| OPERATOR_SDK_VERSION=v1.33.0 | ||
| CONTROLLER_TOOLS_VERSION ?= v0.21.0 | ||
| OPERATOR_SDK_VERSION=v1.42.2 | ||
|
|
||
| KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | ||
| .PHONY: kustomize | ||
|
|
@@ -285,7 +285,7 @@ $(CONTROLLER_GEN): $(LOCALBIN) | |
| .PHONY: envtest | ||
| envtest: $(ENVTEST) ## Download envtest-setup locally if necessary. | ||
| $(ENVTEST): $(LOCALBIN) | ||
| test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) GOFLAGS="" go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.20 | ||
| test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) GOFLAGS="" go install sigs.k8s.io/controller-runtime/tools/setup-envtest@release-0.24 | ||
|
|
||
| .PHONY: bundle | ||
| bundle: operator-sdk manifests kustomize ## Generate bundle manifests and metadata, then validate generated files. | ||
|
|
@@ -363,17 +363,20 @@ OPM = $(shell which opm) | |
| endif | ||
| endif | ||
|
|
||
| PHONY: operator-sdk | ||
| operator-sdk: ## Get the current operator-sdk binary, If there isn't any, we'll use the GOBIN path. | ||
| ifeq (, $(shell which operator-sdk)) | ||
| .PHONY: operator-sdk | ||
| OPERATOR_SDK = $(LOCALBIN)/operator-sdk | ||
| operator-sdk: ## Download operator-sdk locally if necessary. | ||
| ifeq (,$(wildcard $(OPERATOR_SDK))) | ||
| ifeq (,$(shell which operator-sdk 2>/dev/null)) | ||
| @{ \ | ||
| set -e ;\ | ||
| curl -Lk https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_linux_amd64 > $(GOBIN)/operator-sdk ;\ | ||
| chmod u+x $(GOBIN)/operator-sdk ;\ | ||
| mkdir -p $(LOCALBIN) ;\ | ||
| curl -Lk https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_linux_amd64 > $(OPERATOR_SDK) ;\ | ||
| chmod u+x $(OPERATOR_SDK) ;\ | ||
|
Comment on lines
+374
to
+375
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. Remove Using Suggested fix- curl -Lk https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_linux_amd64 > $(OPERATOR_SDK) ;\
+ curl -L https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_linux_amd64 > $(OPERATOR_SDK) ;\🤖 Prompt for AI Agents |
||
| } | ||
| OPERATOR_SDK=$(GOBIN)/operator-sdk | ||
| else | ||
| OPERATOR_SDK=$(shell which operator-sdk) | ||
| OPERATOR_SDK = $(shell which operator-sdk) | ||
| endif | ||
| endif | ||
|
|
||
| .PHONY: generate-daemon-manifest | ||
|
|
@@ -419,7 +422,7 @@ catalog-push: ## Push a catalog image. | |
| $(MAKE) docker-push IMG=$(CATALOG_IMG) | ||
|
|
||
| CILIUM_EBPF_VERSION := v0.18.0 | ||
| GOLANGCI_LINT_VERSION = v1.54.2 | ||
| GOLANGCI_LINT_VERSION = v1.64.8 | ||
| CLANG ?= clang | ||
| CFLAGS := -O2 -g -Wall -Werror $(CFLAGS) | ||
| GOOS ?= linux | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ make undeploy-samples | |
|
|
||
| You need to install the following packages: | ||
|
|
||
| operator-sdk 1.33.0 | ||
| operator-sdk 1.42.2 | ||
|
|
||
| controller-gen v0.20.1+ | ||
|
Comment on lines
+71
to
73
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. Keep tool prerequisite versions aligned with Makefile defaults. README now lists 🤖 Prompt for AI Agents |
||
|
|
||
|
|
||
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.
🧩 Analysis chain
🏁 Script executed:
Repository: openshift/ingress-node-firewall
Length of output: 127
🏁 Script executed:
Repository: openshift/ingress-node-firewall
Length of output: 1178
🏁 Script executed:
Repository: openshift/ingress-node-firewall
Length of output: 750
🏁 Script executed:
Repository: openshift/ingress-node-firewall
Length of output: 341
🏁 Script executed:
Repository: openshift/ingress-node-firewall
Length of output: 1319
Review comment
File: Dockerfile
Lines: 2-2
Snippet showing the final state of code at these lines
Comment
Pin non-Red Hat base images by digest.
golang:1.26(builder, line 2) andgcr.io/distroless/static:nonroot(final stage, line 24) are non-Red Hat tag-based images; pin them by@sha256:...to keep builds reproducible and reduce supply-chain risk.As per coding guidelines for
**/{Dockerfile,Containerfile}*: "non-RH images: pin by digest".🤖 Prompt for AI Agents