Skip to content

Commit 265d68f

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Pass CPU and Memory config to minikube to ensure better stability
Signed-off-by: Jakub Stejskal <[email protected]>
1 parent 86033c8 commit 265d68f

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

.azure/scripts/setup-kubernetes.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,15 @@ if [ "$TEST_CLUSTER" = "minikube" ]; then
6161
mkdir $HOME/.kube || true
6262
touch $HOME/.kube/config
6363

64-
docker run -d -p 127.0.0.1:5000:5000 ${MINIKUBE_REGISTRY_IMAGE}
64+
# TODO - It seems this is no needed at all :O
65+
# docker run -d -p 127.0.0.1:5000:5000 ${MINIKUBE_REGISTRY_IMAGE}
6566

6667
export KUBECONFIG=$HOME/.kube/config
6768
# We can turn on network polices support by adding the following options --network-plugin=cni --cni=calico
6869
# We have to allow trafic for ITS when NPs are turned on
6970
# We can allow NP after Strimzi#4092 which should fix some issues on STs side
7071
minikube start --vm-driver=docker --kubernetes-version=${KUBE_VERSION} \
71-
--insecure-registry=127.0.0.1:5000 --extra-config=apiserver.authorization-mode=Node,RBAC \
72+
--insecure-registry=$(minikube ip):5000 --extra-config=apiserver.authorization-mode=Node,RBAC \
7273
--cpus=${MINIKUBE_CPU} --memory=${MINIKUBE_MEMORY} --force
7374

7475
if [ $? -ne 0 ]

.github/actions/containers-build/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ runs:
3939
# User docker buildx
4040
DOCKER_BUILDX: buildx
4141
# Add option to load image into running Docker daemon and push into local registry to make it available between buildx executions
42-
DOCKER_BUILD_ARGS: "--load --push --build-arg=BUILD_REGISTRY=127.0.0.1:5000/"
43-
BUILD_REGISTRY: "127.0.0.1:5000/"
42+
DOCKER_BUILD_ARGS: "--load --push --build-arg=BUILD_REGISTRY=$(minikube ip):5000/"
43+
BUILD_REGISTRY: "$(minikube ip):5000/"
4444
# TODO - check if these are needed
4545
DOCKER_BUILDKIT: 1
4646
DOCKER_CLI_EXPERIMENTAL: enabled

.github/actions/containers-load/action.yml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ runs:
2626
shell: bash
2727
# eval $(minikube docker-env)
2828
run: |
29+
eval $(minikube docker-env)
2930
make docker_load docker_tag docker_push docker_e2e docker_delete_archive
3031
3132
docker images -a

.github/actions/set-defaults/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
# Not main, not tag/release => treat as PR
2929
echo "PULL_REQUEST=true" >> $GITHUB_ENV
3030
echo "DOCKER_ORG=strimzi" >> $GITHUB_ENV
31-
echo "DOCKER_REGISTRY=127.0.0.1:5000" >> $GITHUB_ENV
31+
echo "DOCKER_REGISTRY=$(minikube ip):5000" >> $GITHUB_ENV
3232
echo "COMMIT=${{ github.sha }}" >> $GITHUB_ENV
3333
echo "TAG=pr" >> $GITHUB_ENV
3434
fi

.github/workflows/run-system-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ jobs:
177177

178178
- name: DEBUG - registry
179179
run: |
180-
curl -s 127.0.0.1:5000/v2/_catalog
180+
curl -s $(minikube ip):5000/v2/_catalog
181181
cat /etc/resolv.conf
182182
183183
# Build Strimzi and its images => used when running STs against PR or main branch where container images should be built
@@ -199,7 +199,7 @@ jobs:
199199

200200
- name: DEBUG - registry v2
201201
run: |
202-
curl -s 127.0.0.1:5000/v2/_catalog
202+
curl -s $(minikube ip):5000/v2/_catalog
203203
204204
- name: Cache local Maven repository
205205
uses: actions/cache@v4
@@ -247,7 +247,7 @@ jobs:
247247
# Default value for PRs is localhost:5000 because we need to push built images into minikube registry and make them available for pods
248248
############################################################################
249249
- name: "Set docker_registry to local registry in minikube"
250-
if: ${{ contains(env.DOCKER_REGISTRY, '127.0.0.1:5000') }}
250+
if: ${{ contains(env.DOCKER_REGISTRY, ':5000') }}
251251
run: |
252252
echo "DOCKER_REGISTRY=$(kubectl get service registry -n kube-system -o=jsonpath='{.spec.clusterIP}'):80" >> $GITHUB_ENV
253253

0 commit comments

Comments
 (0)