Skip to content

Commit

Permalink
ingress-nginx-controller: move binaries to use /usr/bin, remove opent…
Browse files Browse the repository at this point in the history
…racing-cpp, aeger-client-cpp and nginx_ajp_module

The following projects have been deprecated so removing from wolfi and from being used in ingress-nginx-controller.

https://github.com/opentracing/opentracing-cpp
https://github.com/jaegertracing/jaeger-client-cpp

AJP support has been deprecated from the upstream ingress controller project kubernetes/ingress-nginx#10158

Signed-off-by: James Rawlings <[email protected]>
  • Loading branch information
rawlingsj committed Sep 20, 2023
1 parent c6e9ec4 commit 0546aee
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 144 deletions.
52 changes: 19 additions & 33 deletions ingress-nginx-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
package:
name: ingress-nginx-controller
version: 1.8.2
epoch: 2
epoch: 3
description: "Ingress-NGINX Controller for Kubernetes"
copyright:
- license: Apache-2.0
Expand All @@ -15,8 +15,6 @@ package:
- openssl
- openssl-dev
- libcrypt1
- opentracing-cpp
- jaeger-cpp
- msgpack
- datadog-cpp
- yaml-cpp
Expand Down Expand Up @@ -71,7 +69,6 @@ environment:
- geoip-dev
- git
- go
- jaeger-cpp
- libaio-dev
- libcap
- libcap-utils
Expand Down Expand Up @@ -110,7 +107,6 @@ environment:
- openssh-client
- openssl
- openssl-dev
- opentracing-cpp
- patch
- pcre-dev
- perl-dev
Expand All @@ -134,14 +130,12 @@ vars:
MORE_HEADERS_VERSION: "0.33"
NGINX_DIGEST_AUTH: "1.0.0"
NGINX_SUBSTITUTIONS: "b8a71eacc7f986ba091282ab8b1bbbc6ae1807e0"
NGINX_OPENTRACING_VERSION: "0.19.0"
MODSECURITY_NGINX_VERSION: "1.0.3"
OWASP_MODSECURITY_CRS_VERSION: "v3.3.2"
LUA_NGX_VERSION: "0.10.25"
LUA_STREAM_NGX_VERSION: "0.0.13"
LUA_UPSTREAM_VERSION: "8aa93ead98ba2060d4efd594ae33a35d153589bf"
GEOIP2_VERSION: "a26c6beed77e81553686852dceb6c7fdacc5970d"
NGINX_AJP_VERSION: "fcbb2ccca4901d317ecd7a9dabb3fec9378ff40f"
NGX_BROTLI_SHA: 63ca02abdcf79c9e788d2eedcc388d2335902e52

pipeline:
Expand All @@ -166,26 +160,26 @@ pipeline:
-X ${PKG}/version.RELEASE=controller-v${{package.version}} \
-X ${PKG}/version.COMMIT=${COMMIT_SHA} \
-X ${PKG}/version.REPO=${REPO_INFO}" \
-o "${{targets.destdir}}/dbg" ${PKG}/cmd/dbg
-o "${{targets.destdir}}/usr/bin/nginx-dbg" ${PKG}/cmd/dbg
go build -x -v \
-trimpath -ldflags="-buildid= -w -s \
-X ${PKG}/version.RELEASE=controller-v${{package.version}} \
-X ${PKG}/version.COMMIT=${COMMIT_SHA} \
-X ${PKG}/version.REPO=${REPO_INFO}" \
-o "${{targets.destdir}}/waitshutdown" ${PKG}/cmd/waitshutdown
-o "${{targets.destdir}}/usr/bin/waitshutdown" ${PKG}/cmd/waitshutdown
go build -x -v \
-trimpath -ldflags="-buildid= -w -s \
-X ${PKG}/version.RELEASE=controller-v${{package.version}} \
-X ${PKG}/version.COMMIT=${COMMIT_SHA} \
-X ${PKG}/version.REPO=${REPO_INFO}" \
-o "${{targets.destdir}}/nginx-ingress-controller" ${PKG}/cmd/nginx
-o "${{targets.destdir}}/usr/bin/nginx-ingress-controller" ${PKG}/cmd/nginx
setcap cap_net_bind_service=+ep ${{targets.destdir}}/nginx-ingress-controller \
&& setcap -v cap_net_bind_service=+ep ${{targets.destdir}}/nginx-ingress-controller
setcap cap_net_bind_service=+ep ${{targets.destdir}}/usr/bin/nginx-ingress-controller \
&& setcap -v cap_net_bind_service=+ep ${{targets.destdir}}/usr/bin/nginx-ingress-controller
getcap ${{targets.destdir}}/nginx-ingress-controller
getcap ${{targets.destdir}}/usr/bin/nginx-ingress-controller
- uses: fetch
with:
Expand Down Expand Up @@ -238,24 +232,12 @@ pipeline:
expected-sha256: a92c9ee6682567605ece55d4eed5d1d54446ba6fba748cff0a2482aea5713d5f
strip-components: 0

- uses: fetch
with:
uri: https://github.com/yaoweibin/nginx_ajp_module/archive/${{vars.NGINX_AJP_VERSION}}.tar.gz
expected-sha256: 778fcca851bd69dabfb382dc827d2ee07662f7eca36b5e66e67d5512bad75ef8
strip-components: 0

- uses: fetch
with:
uri: https://github.com/atomx/nginx-http-auth-digest/archive/v${{vars.NGINX_DIGEST_AUTH}}.tar.gz
expected-sha256: f09851e6309560a8ff3e901548405066c83f1f6ff88aa7171e0763bd9514762b
strip-components: 0

- uses: fetch
with:
uri: https://github.com/opentracing-contrib/nginx-opentracing/archive/v${{vars.NGINX_OPENTRACING_VERSION}}.tar.gz
expected-sha256: 6f97776ebdf019b105a755c7736b70bdbd7e575c7f0d39db5fe127873c7abf17
strip-components: 0

- uses: fetch
with:
uri: https://github.com/SpiderLabs/ModSecurity-nginx/archive/v${{vars.MODSECURITY_NGINX_VERSION}}.tar.gz
Expand Down Expand Up @@ -297,7 +279,6 @@ pipeline:
cat /etc/ld.so.conf
mkdir -p ${{targets.destdir}}/etc/nginx/
cp -ar /etc/nginx/ ${{targets.destdir}}/etc/nginx/
# Geo ip data from nginx image
cp -ar images/nginx/rootfs/etc/nginx/. ${{targets.destdir}}/etc/nginx/
Expand Down Expand Up @@ -384,9 +365,7 @@ pipeline:
--add-module=${BUILD_PATH}/lua-nginx-module-${{vars.LUA_NGX_VERSION}} \
--add-module=${BUILD_PATH}/stream-lua-nginx-module-${{vars.LUA_STREAM_NGX_VERSION}} \
--add-module=${BUILD_PATH}/lua-upstream-nginx-module-${{vars.LUA_UPSTREAM_VERSION}} \
--add-module=${BUILD_PATH}/nginx_ajp_module-${{vars.NGINX_AJP_VERSION}} \
--add-dynamic-module=${BUILD_PATH}/nginx-http-auth-digest-${{vars.NGINX_DIGEST_AUTH}} \
--add-dynamic-module=${BUILD_PATH}/nginx-opentracing-${{vars.NGINX_OPENTRACING_VERSION}}/opentracing \
--add-dynamic-module=${BUILD_PATH}/ModSecurity-nginx-${{vars.MODSECURITY_NGINX_VERSION}} \
--add-dynamic-module=${BUILD_PATH}/ngx_http_geoip2_module-${{vars.GEOIP2_VERSION}} \
--add-dynamic-module=${BUILD_PATH}/ngx_brotli"
Expand Down Expand Up @@ -419,7 +398,7 @@ pipeline:
echo "::::::::::::::::::::::::::::::::::::::::::::::::::"
./configure \
--prefix=/usr/local/nginx \
--prefix=/usr \
--conf-path=/etc/nginx/nginx.conf \
--modules-path=/etc/nginx/modules \
--http-log-path=/var/log/nginx/access.log \
Expand Down Expand Up @@ -462,8 +441,13 @@ pipeline:
echo ":::: SETCAP NGINX ::::"
echo "::::::::::::::::::::::::::::::::::::::::::"
setcap cap_net_bind_service=+ep ${{targets.destdir}}/usr/local/nginx/sbin/nginx \
&& setcap -v cap_net_bind_service=+ep ${{targets.destdir}}/usr/local/nginx/sbin/nginx
mkdir -p ${{targets.destdir}}/usr/bin
mv ${{targets.destdir}}/usr/sbin/nginx ${{targets.destdir}}/usr/bin/
rm -rf ${{targets.destdir}}/usr/html
rm -rf ${{targets.destdir}}/usr/sbin
setcap cap_net_bind_service=+ep ${{targets.destdir}}/usr/bin/nginx \
&& setcap -v cap_net_bind_service=+ep ${{targets.destdir}}/usr/bin/nginx
echo "::::::::::::::::::::::::::::::::::::::::::"
echo ":::: SETCAP DUMB INIT ::::"
Expand All @@ -490,10 +474,12 @@ subpackages:
pipeline:
- runs: |
mkdir -p ${{targets.subpkgdir}}/usr/local/bin
ln -s /usr/local/nginx/sbin/nginx ${{targets.subpkgdir}}/usr/local/bin/nginx
ln -s /usr/bin/nginx ${{targets.subpkgdir}}/usr/local/bin/nginx
mkdir -p ${{targets.subpkgdir}}/usr/bin
ln -s /usr/local/nginx/sbin/nginx ${{targets.subpkgdir}}/usr/bin/nginx
ln -s /usr/bin/nginx-ingress-controller ${{targets.subpkgdir}}/nginx-ingress-controller
ln -s /usr/bin/waitshutdown ${{targets.subpkgdir}}/waitshutdown
ln -s /usr/bin/nginx-dbg ${{targets.subpkgdir}}/dbg
mkdir -p ${{targets.subpkgdir}}/etc/nginx/modsecurity
ln -s /etc/modsecurity/modsecurity.conf-concurrent ${{targets.subpkgdir}}/etc/nginx/modsecurity/modsecurity.conf
Expand Down
71 changes: 0 additions & 71 deletions jaeger-cpp.yaml

This file was deleted.

40 changes: 0 additions & 40 deletions opentracing-cpp.yaml

This file was deleted.

0 comments on commit 0546aee

Please sign in to comment.