Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions deploy/image/kubernetes-bootcamp/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:slim
RUN apt-get update && apt-get install curl -y
EXPOSE 8080
COPY server.js .
CMD [ "node", "server.js" ]
19 changes: 19 additions & 0 deletions deploy/image/kubernetes-bootcamp/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var http = require('http');
var requests = 0;
var podname = process.env.HOSTNAME;
var startTime;
var host;
var handleRequest = function(request, response) {
response.setHeader('Content-Type', 'text/plain');
response.writeHead(200);
response.write('Hello Kubernetes bootcamp! | Hostname: ');
response.write(host);
response.end(' | v=2\n');
console.log('Hostname:', host, '| Total Requests:', ++requests, '| App Uptime:', (new Date() - startTime)/1000 , 'seconds', '| Log Time:', new Date());
}
var www = http.createServer(handleRequest);
www.listen(8080, function () {
startTime = new Date();
host = process.env.HOSTNAME;
console.log('Kubernetes Bootcamp App Started At:', startTime, '| Running On:', host, '\n');
});
19 changes: 19 additions & 0 deletions hack/prow/image/kubernetes-bootcamp/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://cloud.google.com/cloud-build/docs/build-config
options:
substitution_option: ALLOW_LOOSE
steps:
- name: gcr.io/k8s-staging-test-infra/gcb-docker-gcloud:v20250513-9264efb079
entrypoint: make
env:
- DOCKER_CLI_EXPERIMENTAL=enabled
- _GIT_TAG=$_GIT_TAG
- _PULL_BASE_REF=$_PULL_BASE_REF
args:
- push-kubernetes-bootcamp
substitutions:
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
# can be used as a substitution
_GIT_TAG: '12345'
# _PULL_BASE_REF will contain the ref that was pushed to to trigger this build -
# a branch like 'master' or 'release-0.2', or a tag like 'v0.2'.
_PULL_BASE_REF: 'master'
12 changes: 9 additions & 3 deletions hack/prow/prow.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.PHONY: integration-prow-kvm-docker-linux-x86-64

.PHONY: integration-prow-kvm-docker-linux-x86-64 integration-prow-docker-docker-linux-x86-64 push-kubernetes-bootcamp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about add this new phony right before the target to match other ones. Instead of putting all .phonies in one place


integration-prow-docker-docker-linux-x86-64:
# build first
Expand All @@ -16,4 +15,11 @@ integration-prow-kvm-docker-linux-x86-64:
cp -f "${GCE_SSH_PRIVATE_KEY_FILE}" ~/.ssh/google_compute_engine
cp -f "${GCE_SSH_PUBLIC_KEY_FILE}" ~/.ssh/google_compute_engine.pub
GOTOOLCHAIN=auto go build -C ./hack/prow/minitest -o $(PWD)/out/minitest .
./out/minitest --deployer boskos --tester kvm-docker-linux-amd64-integration --config hack/prow/kvm.json
./out/minitest --deployer boskos --tester kvm-docker-linux-amd64-integration --config hack/prow/kvm.json

push-kubernetes-bootcamp:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about naming it prow so all prow things have a prow in their name

push-prow-kubernetes-bootcamp:

docker run --rm --privileged tonistiigi/binfmt:latest --install all
docker buildx create --name multiarch --bootstrap
docker buildx build --builder multiarch --push --platform linux/amd64,linux/arm64 \
-t gcr.io/minikube/kubernetes-bootcamp:$(_GIT_TAG) -t gcr.io/minikube/kubernetes-bootcamp:latest deploy/image/kubernetes-bootcamp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we have access to gcr.io/minikube in prow ?

docker buildx rm multiarch