Jail/chroot nginx process inside controller container (#8337)
* Initial work on chrooting nginx process * More improvements in chroot * Fix charts and some file locations * Fix symlink on non chrooted container * fix psp test * Add e2e tests to chroot image * Fix logger * Add internal logger in controller * Fix overlay for chrooted tests * Fix tests * fix boilerplates * Fix unittest to point to the right pid * Fix PR review
This commit is contained in:
parent
83ce21b4dd
commit
3def835a6a
41 changed files with 456 additions and 49 deletions
30
Makefile
30
Makefile
|
|
@ -75,11 +75,30 @@ image: clean-image ## Build image for a particular arch.
|
|||
--build-arg BUILD_ID="$(BUILD_ID)" \
|
||||
-t $(REGISTRY)/controller:$(TAG) rootfs
|
||||
|
||||
.PHONY: image-chroot
|
||||
image-chroot: clean-chroot-image ## Build image for a particular arch.
|
||||
echo "Building docker image ($(ARCH))..."
|
||||
@docker build \
|
||||
--no-cache \
|
||||
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
||||
--build-arg VERSION="$(TAG)" \
|
||||
--build-arg TARGETARCH="$(ARCH)" \
|
||||
--build-arg COMMIT_SHA="$(COMMIT_SHA)" \
|
||||
--build-arg BUILD_ID="$(BUILD_ID)" \
|
||||
-t $(REGISTRY)/controller-chroot:$(TAG) rootfs -f rootfs/Dockerfile.chroot
|
||||
|
||||
.PHONY: clean-image
|
||||
clean-image: ## Removes local image
|
||||
echo "removing old image $(REGISTRY)/controller:$(TAG)"
|
||||
@docker rmi -f $(REGISTRY)/controller:$(TAG) || true
|
||||
|
||||
|
||||
.PHONY: clean-chroot-image
|
||||
clean-chroot-image: ## Removes local image
|
||||
echo "removing old image $(REGISTRY)/controller-chroot:$(TAG)"
|
||||
@docker rmi -f $(REGISTRY)/controller-chroot:$(TAG) || true
|
||||
|
||||
|
||||
.PHONY: build
|
||||
build: ## Build ingress controller, debug tool and pre-stop hook.
|
||||
@build/run-in-docker.sh \
|
||||
|
|
@ -221,3 +240,14 @@ release: ensure-buildx clean
|
|||
--build-arg COMMIT_SHA="$(COMMIT_SHA)" \
|
||||
--build-arg BUILD_ID="$(BUILD_ID)" \
|
||||
-t $(REGISTRY)/controller:$(TAG) rootfs
|
||||
|
||||
@docker buildx build \
|
||||
--no-cache \
|
||||
--push \
|
||||
--progress plain \
|
||||
--platform $(subst $(SPACE),$(COMMA),$(PLATFORMS)) \
|
||||
--build-arg BASE_IMAGE="$(BASE_IMAGE)" \
|
||||
--build-arg VERSION="$(TAG)" \
|
||||
--build-arg COMMIT_SHA="$(COMMIT_SHA)" \
|
||||
--build-arg BUILD_ID="$(BUILD_ID)" \
|
||||
-t $(REGISTRY)/controller-chroot:$(TAG) rootfs -f rootfs/Dockerfile.chroot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue