Skip to content

Commit

Permalink
fix macos localhost problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Apr 26, 2024
1 parent c7e86c4 commit e4b0f1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ install-serverless-latest-release:## Install serverless from latest release
make -C ${OPERATOR_ROOT} check-serverless-installation

.PHONY: install-serverless-local-sources
install-serverless-local-sources: ## Install serverless from local sources. Tip: On some OSes it won't work without preconfiguration. See Readme.md rroubleshooting section.
install-serverless-local-sources: ## Install serverless from local sources.
$(eval IMG_VERSION=local-$(shell date +'%Y%m%d-%H%M%S'))
IMG_VERSION=${IMG_VERSION} ./hack/build_all.sh

Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,3 @@ kubectl apply -f https://github.com/kyma-project/serverless/releases/latest/down
secretName: my-secret
EOF
```
## Troubleshooting
### Target install-serverless-local-sources - lookup k3d-kyma-registry.localhost: no such host
On some OSes there is a problem with pushing to k3d registry.
The error log may look similar:
```
+ docker push k3d-kyma-registry.localhost:5000/kyma-project/function-controller:local-20240426-111856
The push refers to repository [k3d-kyma-registry.localhost:5000/kyma-project/function-controller]
Get "https://k3d-kyma-registry.localhost:5000/v2/": dialing k3d-kyma-registry.localhost:5000 with direct connection: resolving host k3d-kyma-registry.localhost: lookup k3d-kyma-registry.localhost: no such host
make: *** [install-serverless-local-sources] Error 1
```
You have to add `127.0.0.1 k3d-kyma-registry.locahost` to your `etc/hosts`.
More details: https://k3d.io/v5.3.0/usage/registries/#preface-referencing-local-registries
12 changes: 6 additions & 6 deletions hack/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
services:
# serverless
function_controller:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-controller:local
image: localhost:5000/kyma-project/function-controller:local
platform: "linux/amd64"
build:
context: ../
dockerfile: components/serverless/deploy/manager/Dockerfile
function_build_init:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-build-init:local
image: localhost:5000/kyma-project/function-build-init:local
platform: "linux/amd64"
build:
context: ../
dockerfile: components/serverless/deploy/jobinit/Dockerfile
# runtimes
function_runtime_nodejs18:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-runtime-nodejs18:local
image: localhost:5000/kyma-project/function-runtime-nodejs18:local
platform: "linux/amd64"
build:
context: ../components/runtimes/nodejs
dockerfile: nodejs18/Dockerfile
function_runtime_nodejs20:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-runtime-nodejs20:local
image: localhost:5000/kyma-project/function-runtime-nodejs20:local
platform: "linux/amd64"
build:
context: ../components/runtimes/nodejs
dockerfile: nodejs20/Dockerfile
function_runtime_python39:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-runtime-python39:local
image: localhost:5000/kyma-project/function-runtime-python39:local
platform: "linux/amd64"
build:
context: ../components/runtimes/python
dockerfile: python39/Dockerfile
function_runtime_python312:
image: k3d-kyma-registry.localhost:5000/kyma-project/function-runtime-python312:local
image: localhost:5000/kyma-project/function-runtime-python312:local
platform: "linux/amd64"
build:
context: ../components/runtimes/python
Expand Down

0 comments on commit e4b0f1f

Please sign in to comment.