Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func deploy doesn't support registry port #2508

Open
fbartnitzek opened this issue Sep 19, 2024 · 1 comment
Open

func deploy doesn't support registry port #2508

fbartnitzek opened this issue Sep 19, 2024 · 1 comment

Comments

@fbartnitzek
Copy link

I try to run a knative function on a docker desktop k8s cluster.
For the registry, I use registry:2 on docker desktop with forwarded port to 5001:

$ docker ps | grep registry:2
04a2c59975c7   registry:2   "/entrypoint.sh /etc…"   18 minutes ago   Up 18 minutes   0.0.0.0:5001->5000/tcp   registry

Sample func:

specVersion: 0.36.0
name: demo
runtime: go
registry: registry.192.168.2.99.sslip.io:5001
image: registry.192.168.2.99.sslip.io:5001/demo:latest
created: 2024-08-02T10:48:42.077191+02:00
invoke: cloudevent
build:
  builder: host
  buildEnvs:
  - name: FUNC_ENABLE_HOST_BUILDER
    value: "true"
  - name: FUNC_BUILDER
    value: host
  - name: FUNC_CONTAINER
    value: "true"
  - name: LOG_LEVEL
    value: error
run:
  envs:
  - value: '{{ secret:demo }}'
deploy:
  namespace: cs
  image: registry.192.168.2.99.sslip.io:5001/demo:latest
  options:
    scale:
      min: 0
      max: 1
  subscriptions:
  - source: default
    filters:
      type: demo.event

The build of the function, even with image upload works as expected:

$ func build -u --registry-insecure
Building function image
   f.linux.amd64
go: module ./f requires go >= 1.22.4; switching to go1.22.7
go: upgraded go 1.21 => 1.22.4
go: added toolchain go1.22.7
go: upgraded github.com/rs/zerolog v1.32.0 => v1.33.0
go: upgraded golang.org/x/sys v0.18.0 => v0.22.0
   f.linux.arm64
   f.linux.arm.v7
🙌 Function built: registry.192.168.2.99.sslip.io:5001/demo:latest

$ curl -k registry.192.168.2.99.sslip.io:5001/v2/demo/tags/list
{"name":"demo","tags":["latest"]}

But the deployment command doesn't support image-names with a port in it:

$ func deploy -i registry.192.168.2.99.sslip.io:5001/demo:latest
Warning: namespace chosen is 'cs', but currently active namespace is 'default'. Continuing with deployment to 'cs'.
Error: image 'registry.192.168.2.99.sslip.io:5001/demo:latest' contains an invalid tag (extra ':')

Please fix that validation, so that local registries are allowed to test knative functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@fbartnitzek and others