mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-09-19 17:21:36 +00:00
Several fixes for building
- use go1.22 in teh test image - move controller image build out of the docker stanza so its fast - bump controller-gen version to 0.14.0 Signed-off-by: Itxaka <itxaka@kairos.io>
This commit is contained in:
1
.earthlyignore
Normal file
1
.earthlyignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bin/
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -24,3 +24,4 @@ testbin/*
|
|||||||
*~
|
*~
|
||||||
|
|
||||||
/helm-chart
|
/helm-chart
|
||||||
|
build/
|
||||||
|
10
Earthfile
10
Earthfile
@@ -76,7 +76,7 @@ luet:
|
|||||||
|
|
||||||
e2e-tests-image:
|
e2e-tests-image:
|
||||||
FROM opensuse/tumbleweed
|
FROM opensuse/tumbleweed
|
||||||
RUN zypper in -y go git qemu-x86 qemu-arm qemu-tools swtpm docker jq docker-compose make glibc libopenssl-devel curl gettext-runtime
|
RUN zypper in -y go1.22 git qemu-x86 qemu-arm qemu-tools swtpm docker jq docker-compose make glibc libopenssl-devel curl gettext-runtime awk envsubst
|
||||||
ENV GOPATH="/go"
|
ENV GOPATH="/go"
|
||||||
|
|
||||||
COPY . /test
|
COPY . /test
|
||||||
@@ -94,11 +94,15 @@ e2e-tests-image:
|
|||||||
RUN luet repo add -y kairos --url quay.io/kairos/packages --type docker
|
RUN luet repo add -y kairos --url quay.io/kairos/packages --type docker
|
||||||
RUN LUET_NOLOCK=true luet install -y container/kubectl utils/k3d
|
RUN LUET_NOLOCK=true luet install -y container/kubectl utils/k3d
|
||||||
|
|
||||||
|
controller-latest:
|
||||||
|
FROM DOCKERFILE .
|
||||||
|
SAVE IMAGE controller:latest
|
||||||
|
|
||||||
e2e-tests:
|
e2e-tests:
|
||||||
FROM +e2e-tests-image
|
FROM +e2e-tests-image
|
||||||
ARG LABEL
|
ARG LABEL
|
||||||
|
RUN make test # This also generates the latest controllers automatically, we do that before building the docker image with them
|
||||||
WITH DOCKER --allow-privileged
|
WITH DOCKER --allow-privileged --load controller:latest=+controller-latest
|
||||||
RUN ./scripts/e2e-tests.sh
|
RUN ./scripts/e2e-tests.sh
|
||||||
END
|
END
|
||||||
|
|
||||||
|
2
Makefile
2
Makefile
@@ -160,7 +160,7 @@ ENVTEST ?= $(LOCALBIN)/setup-envtest
|
|||||||
|
|
||||||
## Tool Versions
|
## Tool Versions
|
||||||
KUSTOMIZE_VERSION ?= v3.8.7
|
KUSTOMIZE_VERSION ?= v3.8.7
|
||||||
CONTROLLER_TOOLS_VERSION ?= v0.9.2
|
CONTROLLER_TOOLS_VERSION ?= v0.14.0
|
||||||
|
|
||||||
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
|
KUSTOMIZE_INSTALL_SCRIPT ?= "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh"
|
||||||
.PHONY: kustomize
|
.PHONY: kustomize
|
||||||
|
@@ -34,10 +34,8 @@ trap cleanup EXIT
|
|||||||
k3d cluster create "$CLUSTER_NAME" --k3s-arg "--cluster-cidr=10.49.0.1/16@server:0" --k3s-arg "--service-cidr=10.48.0.1/16@server:0" -p '80:80@server:0' -p '443:443@server:0' --image "$K3S_IMAGE"
|
k3d cluster create "$CLUSTER_NAME" --k3s-arg "--cluster-cidr=10.49.0.1/16@server:0" --k3s-arg "--service-cidr=10.48.0.1/16@server:0" -p '80:80@server:0' -p '443:443@server:0' --image "$K3S_IMAGE"
|
||||||
k3d kubeconfig get "$CLUSTER_NAME" > "$KUBECONFIG"
|
k3d kubeconfig get "$CLUSTER_NAME" > "$KUBECONFIG"
|
||||||
|
|
||||||
# Build the docker image
|
# Import the controller image that we built at the start into to the cluster
|
||||||
IMG=controller:latest make docker-build
|
# this image has to exists and be available in the local docker
|
||||||
|
|
||||||
# Import the image to the cluster
|
|
||||||
k3d image import -c "$CLUSTER_NAME" controller:latest
|
k3d image import -c "$CLUSTER_NAME" controller:latest
|
||||||
|
|
||||||
# Install cert manager
|
# Install cert manager
|
||||||
|
Reference in New Issue
Block a user