Build NGINX v1.25 image (#10629)

This commit is contained in:
Ricardo Katz 2024-01-19 19:31:41 -03:00 committed by GitHub
parent c9c72c4e26
commit ed3f067b8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 1043 additions and 5 deletions

View file

@ -79,6 +79,7 @@ kubectl run --rm \
--env="FOCUS=${FOCUS}" \
--env="IS_CHROOT=${IS_CHROOT:-false}"\
--env="ENABLE_VALIDATIONS=${ENABLE_VALIDATIONS:-false}"\
--env="SKIP_OPENTELEMETRY_TESTS=${SKIP_OPENTELEMETRY_TESTS:-false}"\
--env="E2E_CHECK_LEAKS=${E2E_CHECK_LEAKS}" \
--env="NGINX_BASE_IMAGE=${NGINX_BASE_IMAGE}" \
--env="HTTPBUN_IMAGE=${HTTPBUN_IMAGE}" \

View file

@ -46,7 +46,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export TAG=1.0.0-dev
export ARCH=${ARCH:-amd64}
export REGISTRY=ingress-controller
NGINX_BASE_IMAGE=$(cat "$DIR"/../../NGINX_BASE)
NGINX_BASE_IMAGE=${NGINX_BASE_IMAGE:-$(cat "$DIR"/../../NGINX_BASE)}
export NGINX_BASE_IMAGE=$NGINX_BASE_IMAGE
export DOCKER_CLI_EXPERIMENTAL=enabled
export KUBECONFIG="${KUBECONFIG:-$HOME/.kube/kind-config-$KIND_CLUSTER_NAME}"
@ -85,10 +85,10 @@ fi
if [ "${SKIP_INGRESS_IMAGE_CREATION}" = "false" ]; then
echo "[dev-env] building image"
if [ "${IS_CHROOT}" = "true" ]; then
make -C "${DIR}"/../../ clean-image build image-chroot
make BASE_IMAGE="${NGINX_BASE_IMAGE}" -C "${DIR}"/../../ clean-image build image-chroot
docker tag ${REGISTRY}/controller-chroot:${TAG} ${REGISTRY}/controller:${TAG}
else
make -C "${DIR}"/../../ clean-image build image
make BASE_IMAGE="${NGINX_BASE_IMAGE}" -C "${DIR}"/../../ clean-image build image
fi
echo "[dev-env] .. done building controller images"

View file

@ -17,6 +17,7 @@ limitations under the License.
package settings
import (
"os"
"strings"
"github.com/onsi/ginkgo/v2"
@ -39,6 +40,12 @@ const (
var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
f := framework.NewDefaultFramework("enable-opentelemetry")
shouldSkip := false
skip, ok := os.LookupEnv("SKIP_OPENTELEMETRY_TESTS")
if ok && skip == enable {
shouldSkip = true
}
ginkgo.BeforeEach(func() {
f.NewEchoDeployment()
})
@ -47,6 +54,9 @@ var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
})
ginkgo.It("should not exists opentelemetry directive", func() {
if shouldSkip {
ginkgo.Skip("skipped")
}
config := map[string]string{}
config[enableOpentelemetry] = disable
f.SetNginxConfigMapData(config)
@ -60,6 +70,9 @@ var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
})
ginkgo.It("should exists opentelemetry directive when is enabled", func() {
if shouldSkip {
ginkgo.Skip("skipped")
}
config := map[string]string{}
config[enableOpentelemetry] = enable
config[opentelemetryConfig] = opentelemetryConfigPath
@ -74,6 +87,9 @@ var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
})
ginkgo.It("should include opentelemetry_trust_incoming_spans on directive when enabled", func() {
if shouldSkip {
ginkgo.Skip("skipped")
}
config := map[string]string{}
config[enableOpentelemetry] = enable
config[opentelemetryConfig] = opentelemetryConfigPath
@ -89,6 +105,9 @@ var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
})
ginkgo.It("should not exists opentelemetry_operation_name directive when is empty", func() {
if shouldSkip {
ginkgo.Skip("skipped")
}
config := map[string]string{}
config[enableOpentelemetry] = enable
config[opentelemetryConfig] = opentelemetryConfigPath
@ -104,6 +123,9 @@ var _ = framework.IngressNginxDescribe("Configure Opentelemetry", func() {
})
ginkgo.It("should exists opentelemetry_operation_name directive when is configured", func() {
if shouldSkip {
ginkgo.Skip("skipped")
}
config := map[string]string{}
config[enableOpentelemetry] = enable
config[opentelemetryConfig] = opentelemetryConfigPath