Closed mcguiresm closed 4 years ago
Hi @mcguiresm - glad you are finding OpenFaaS useful to your Knative deployment.
Would you be willing to work on this feature?
Alex
/set title: Image tag generation not working with generate command
I suspect this might also affect the OpenFaaS generation command, which we use for our own CRD for use with the operator.
@utsavanand2 can you look into this please?
Hey @alexellis - absolutely.
This appears to work fine for our own CRD generation:
faas-cli generate -f stack.yml --filter url-ping --tag=sha
---
apiVersion: openfaas.com/v1alpha2
kind: Function
metadata:
name: url-ping
spec:
name: url-ping
image: alexellis/faas-url-ping:0.2-c12d57c
I have a fix for this issue as I haven't heard from you since you agreed to work on a week ago.
./faas-cli generate --filter url-ping -f stack.yml --tag=sha --api serving.knative.dev/v1alpha1
---
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: url-ping
namespace: openfaas-fn
spec:
runLatest:
configuration:
revisionTemplate:
spec:
container:
image: alexellis/faas-url-ping:0.2-c12d57c
Hey @alexellis - Sorry about that, week got away from me. That is what I ended up doing in testing as well and seemed to work.
Expected Behaviour
faas-cli generate -f hello-world.yml --tag branch --api=serving.knative.dev/v1alpha1
Current Behaviour
faas-cli generate -f hello-world.yml --tag branch --api=serving.knative.dev/v1alpha1
Possible Solution
Quick test of adding schema.BuildImageName() from generateCRDYAML() in generateknativev1alphaServicingCRDYAML() and modifying Image: to use the result from schema.BuildImageName() worked correctly. If that seems appropriate and there are no pitfalls I can submit a PR.
Steps to Reproduce (for bugs)
$ mkdir hello-world
$ cd hello-world
$ faas-cli new hello-world --lang csharp
$ faas-cli generate -f hello-world.yml --tag branch --api=serving.knative.dev/v1alpha1
Context
Trying to leverage OpenFaaS developer experience with KNative serving feature set due to existing setup.
Your Environment
FaaS-CLI version ( Full output from:
faas-cli version
):Docker version ( Full output from:
docker version
):Server: Docker Engine - Community Engine: Version: 19.03.12 API version: 1.40 (minimum version 1.12) Go version: go1.13.10 Git commit: 48a66213fe Built: Mon Jun 22 15:49:27 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: v1.2.13 GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429 runc: Version: 1.0.0-rc10 GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd docker-init: Version: 0.18.0 GitCommit: fec3683