knative / func

Knative Functions client API and CLI
Apache License 2.0
263 stars 135 forks source link

Func Deploy issue with local kind registry #2371

Open matzew opened 2 weeks ago

matzew commented 2 weeks ago

Using the local kind registry from kn quickstart, I am getting a little issue.

Running the first deploy is good:

func deploy --registry localhost:5001
Building function image
Still building
🙌 Function built: localhost:5001/s3-logger:latest
Pushing function image to the registry "localhost:5001" using the "" user credentials
⬆️  Deploying function to the cluster
🎯 Creating Triggers on the cluster
✅ Function deployed in namespace "default" and exposed at URL: 
   http://s3-logger.default.127.0.0.1.sslip.io

Now, running it for a second time (and yes, no code changes), I am getting an error:

➜  s3-logger func deploy --registry localhost:5001
function up-to-date. Force rebuild with --build
Pushing function image to the registry "localhost:5001" using the "" user credentials
Error: Error response from daemon: failed to find image localhost:5001/s3-logger@sha256:82e961f6b4868a296547f477cec305af1048c4e9785bdc23e71088612675c42c: localhost:5001/s3-logger@sha256:82e961f6b4868a296547f477cec305af1048c4e9785bdc23e71088612675c42c: No such image

there is a work-around, by forcing the rebuild to happen, using the --build argument:

➜  s3-logger func deploy --build --registry localhost:5001
Building function image
Still building
🙌 Function built: localhost:5001/s3-logger:latest
Pushing function image to the registry "localhost:5001" using the "" user credentials
⬆️  Deploying function to the cluster
🎯 Creating Triggers on the cluster
✅ Function updated in namespace "default" and exposed at URL: 

NOTE: I am running w/ podman - not the docker CLI

matejvasek commented 2 weeks ago

Did you use latest release or main @matzew ?

matejvasek commented 2 weeks ago

btw another workaround could be flag -u=0.

matzew commented 2 weeks ago

I used 0.41 version.

btw another workaround could be flag -u=0

is there any doc for that?

matejvasek commented 2 weeks ago

-u=0 skips push