Skip to content

Commit

Permalink
first impl
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Apr 10, 2024
1 parent 9612e5a commit 3ced42a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ install-serverless-latest-release: ## Install serverless from latest release
kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/latest/download/default-serverless-cr.yaml -n kyma-system
make -C ${OPERATOR_ROOT} check-serverless-installation

.PHONY: install-serverless-local-sources
install-serverless-local-sources:
$(eval IMG_VERSION=local-$(shell date +'%Y%m%d-%H%M%S'))
IMG_VERSION=${IMG_VERSION} ./hack/build_all.sh

$(eval IMG=europe-docker.pkg.dev/kyma-project/dev/serverless-operator:${IMG_VERSION})
IMG_DIRECTORY="dev" IMG_VERSION=${IMG_VERSION} IMG=${IMG} make -C ${OPERATOR_ROOT} docker-build-local

k3d image import "${IMG}" -c kyma
IMG=${IMG} make install-serverless-custom-operator

.PHONY: remove-serverless
remove-serverless: ## Remove serverless-cr and serverless operator
make -C ${OPERATOR_ROOT} remove-serverless undeploy
Expand Down
15 changes: 15 additions & 0 deletions hack/build_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e
HACK_DIR="./hack"

echo "New tag: $IMG_VERSION"
(cd "${HACK_DIR}" && pwd && docker compose build)

for i in $(yq '.services[].image' ${HACK_DIR}/docker-compose.yaml); do
IMAGE_NAME=$(echo "${i}" | cut -d ":" -f 1)
NEW_IMAGE_NAME="${IMAGE_NAME}:${IMG_VERSION}"
docker tag "${i}" "${NEW_IMAGE_NAME}"
set -x
k3d image import "${NEW_IMAGE_NAME}" -c kyma
set +x
done
39 changes: 39 additions & 0 deletions hack/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
services:
# serverless
function_controller:
image: europe-docker.pkg.dev/kyma-project/dev/function-controller:local
platform: "linux/amd64"
build:
context: ../
dockerfile: components/serverless/deploy/manager/Dockerfile
function_build_init:
image: europe-docker.pkg.dev/kyma-project/dev/function-build-init:local
platform: "linux/amd64"
build:
context: ../
dockerfile: components/serverless/deploy/jobinit/Dockerfile
# runtimes
function_runtime_nodejs18:
image: europe-docker.pkg.dev/kyma-project/dev/function-runtime-nodejs18:local
platform: "linux/amd64"
build:
context: ../components/runtimes/nodejs
dockerfile: nodejs18/Dockerfile
function_runtime_nodejs20:
image: europe-docker.pkg.dev/kyma-project/dev/function-runtime-nodejs20:local
platform: "linux/amd64"
build:
context: ../components/runtimes/nodejs
dockerfile: nodejs20/Dockerfile
function_runtime_python39:
image: europe-docker.pkg.dev/kyma-project/dev/function-runtime-python39:local
platform: "linux/amd64"
build:
context: ../components/runtimes/python
dockerfile: python39/Dockerfile
function_runtime_python312:
image: europe-docker.pkg.dev/kyma-project/dev/function-runtime-python312:local
platform: "linux/amd64"
build:
context: ../components/runtimes/python
dockerfile: python312/Dockerfile

0 comments on commit 3ced42a

Please sign in to comment.