Skip to content

Commit d2bfa29

Browse files
committed
Merge branch 'tests/docker-packages' of github.com:nginx/kubernetes-ingress into tests/docker-packages
2 parents 8276a43 + 26e0b1b commit d2bfa29

File tree

10 files changed

+633
-629
lines changed

10 files changed

+633
-629
lines changed

.github/data/version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
IC_VERSION=5.1.0
2-
HELM_CHART_VERSION=2.2.0
1+
IC_VERSION=5.2.0
2+
HELM_CHART_VERSION=2.3.0

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
VER = $(shell grep IC_VERSION .github/data/version.txt | cut -d '=' -f 2)
33
GIT_TAG = $(shell git describe --exact-match --tags || echo untagged)
44
VERSION = $(VER)-SNAPSHOT
5+
NGINX_OSS_VERSION ?= 1.27
56
NGINX_PLUS_VERSION ?= R34
67
PLUS_ARGS = --build-arg NGINX_PLUS_VERSION=$(NGINX_PLUS_VERSION) --secret id=nginx-repo.crt,src=nginx-repo.crt --secret id=nginx-repo.key,src=nginx-repo.key
78

@@ -134,11 +135,11 @@ build-goreleaser: ## Build Ingress Controller binary using GoReleaser
134135

135136
.PHONY: debian-image
136137
debian-image: build ## Create Docker image for Ingress Controller (Debian)
137-
$(DOCKER_CMD) --build-arg BUILD_OS=debian
138+
$(DOCKER_CMD) --build-arg BUILD_OS=debian --build-arg NGINX_OSS_VERSION=$(NGINX_OSS_VERSION)
138139

139140
.PHONY: alpine-image
140141
alpine-image: build ## Create Docker image for Ingress Controller (Alpine)
141-
$(DOCKER_CMD) --build-arg BUILD_OS=alpine
142+
$(DOCKER_CMD) --build-arg BUILD_OS=alpine --build-arg NGINX_OSS_VERSION=$(NGINX_OSS_VERSION)
142143

143144
.PHONY: alpine-image-plus
144145
alpine-image-plus: build ## Create Docker image for Ingress Controller (Alpine with NGINX Plus)
@@ -179,7 +180,7 @@ debian-image-nap-dos-plus: build ## Create Docker image for Ingress Controller (
179180

180181
.PHONY: ubi-image
181182
ubi-image: build ## Create Docker image for Ingress Controller (UBI)
182-
$(DOCKER_CMD) --build-arg BUILD_OS=ubi
183+
$(DOCKER_CMD) --build-arg BUILD_OS=ubi --build-arg NGINX_OSS_VERSION=$(NGINX_OSS_VERSION)
183184

184185
.PHONY: ubi-image-plus
185186
ubi-image-plus: build ## Create Docker image for Ingress Controller (UBI with NGINX Plus)

build/Dockerfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# syntax=docker/dockerfile:1.16
22
ARG BUILD_OS=debian
3+
ARG NGINX_OSS_VERSION=1.27
34
ARG NGINX_PLUS_VERSION=R34
45
ARG DOWNLOAD_TAG=edge
56
ARG DEBIAN_FRONTEND=noninteractive
@@ -83,6 +84,7 @@ USER 101
8384
############################################# Base image for Alpine #############################################
8485
FROM nginx:1.27.5-alpine@sha256:65645c7bb6a0661892a8b03b89d0743208a18dd2f3f17a54ef4b76fb8e2f2a10 AS alpine
8586
ARG PACKAGE_REPO
87+
ARG NGINX_OSS_VERSION
8688

8789
RUN --mount=type=bind,from=nginx-files,src=nginx_signing.rsa.pub,target=/etc/apk/keys/nginx_signing.rsa.pub \
8890
--mount=type=bind,from=nginx-files,src=user_agent,target=/tmp/user_agent \
@@ -91,14 +93,15 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.rsa.pub,target=/etc/apk
9193
&& export $(cat /tmp/user_agent) \
9294
&& printf "%s%s%s\n" "http://packages.nginx.org/nginx/mainline/alpine/v" `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` "/main" >> /etc/apk/repositories \
9395
&& printf "%s%s%s\n" "http://packages.nginx.org/nginx-agent/alpine/v" `egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` "/main" >> /etc/apk/repositories \
94-
&& apk add --no-cache nginx-module-otel "nginx-agent<3.1" \
96+
&& apk add --no-cache nginx-module-otel~${NGINX_OSS_VERSION} "nginx-agent<3.1" \
9597
&& ldconfig /usr/local/lib/ \
9698
&& agent.sh \
9799
&& sed -i -e '/nginx.org/d' /etc/apk/repositories
98100

99101

100102
############################################# Base image for Debian #############################################
101103
FROM nginx:1.27.5@sha256:6784fb0834aa7dbbe12e3d7471e69c290df3e6ba810dc38b34ae33d3c1c05f7d AS debian
104+
ARG NGINX_OSS_VERSION
102105

103106
RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_signing.key \
104107
--mount=type=bind,from=nginx-files,src=90pkgs-nginx,target=/etc/apt/apt.conf.d/90pkgs-nginx \
@@ -113,16 +116,16 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
113116
http://packages.nginx.org/nginx-agent/debian `lsb_release -cs` agent" >> /etc/apt/sources.list.d/nginx.list \
114117
&& printf "%s" "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" > /etc/apt/preferences.d/99nginx \
115118
&& apt-get update \
116-
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.0.* nginx-module-otel \
119+
&& apt-get install --no-install-recommends --no-install-suggests -y nginx-agent=3.0.* nginx-module-otel=${NGINX_OSS_VERSION}* \
117120
&& apt-get purge --auto-remove -y gpg \
118-
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/nginx-agent.sources /etc/apt/preferences.d/99nginx /etc/apt/sources.list.d/nginx.list \
119-
&& agent.sh \
120-
&& ldconfig
121+
&& rm -rf /var/lib/apt/lists/* /etc/apt/preferences.d/99nginx /etc/apt/sources.list.d/nginx.list \
122+
&& agent.sh
121123

122124

123125
############################################# Base image for UBI #############################################
124126
FROM ubi-minimal AS ubi
125127
ARG IC_VERSION
128+
ARG NGINX_OSS_VERSION
126129

127130
LABEL name="NGINX Ingress Controller" \
128131
maintainer="[email protected]" \
@@ -156,7 +159,7 @@ RUN --mount=type=bind,from=nginx-files,src=nginx_signing.key,target=/tmp/nginx_s
156159
&& printf "%s\n" "[agent]" "name=agent repo" \
157160
"baseurl=https://packages.nginx.org/nginx-agent/centos/9/\$basearch/" \
158161
"gpgcheck=1" "enabled=1" "module_hotfixes=true" >> /etc/yum.repos.d/nginx.repo \
159-
&& microdnf --nodocs install -y nginx nginx-module-njs nginx-module-otel nginx-module-image-filter nginx-module-xslt nginx-agent-3.0.* \
162+
&& microdnf --nodocs install -y nginx-${NGINX_OSS_VERSION}* nginx-module-njs-${NGINX_OSS_VERSION}* nginx-module-otel-${NGINX_OSS_VERSION}* nginx-module-image-filter-${NGINX_OSS_VERSION}* nginx-module-xslt-${NGINX_OSS_VERSION}* nginx-agent-3.0.* \
160163
&& rm /etc/yum.repos.d/nginx.repo \
161164
&& ubi-clean.sh
162165

build/dependencies/Dockerfile.ubi9

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1.16
2-
FROM redhat/ubi9:9.6@sha256:7a4818cdb8e0461d75d4bdfa42a355d3725bcc8cc0cc5d467021119d5962ce6b AS rpm-build
2+
FROM redhat/ubi9:9.6@sha256:2e4eebec441e8bbc3459fcc83ddee0f7d3cfd219097b4110a37d7ff4fe0ff2e9 AS rpm-build
33
RUN mkdir -p /rpms/ \
44
&& dnf install rpm-build gcc make cmake -y \
55
&& rpmbuild --rebuild --nodebuginfo https://mirror.stream.centos.org/9-stream/BaseOS/source/tree/Packages/c-ares-1.19.1-1.el9.src.rpm \

charts/nginx-ingress/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: nginx-ingress
3-
version: 2.2.0
4-
appVersion: 5.1.0
3+
version: 2.3.0
4+
appVersion: 5.2.0
55
kubeVersion: ">= 1.25.0-0"
66
type: application
77
description: NGINX Ingress Controller

0 commit comments

Comments
 (0)