diff --git a/examples/knative/powercli/kn-pcli-template/README.md b/examples/knative/powercli/kn-pcli-template/README.md index d4b6ae4b..cefb6ed0 100644 --- a/examples/knative/powercli/kn-pcli-template/README.md +++ b/examples/knative/powercli/kn-pcli-template/README.md @@ -1,6 +1,6 @@ # Knative Function Template Delete this section before publishing your new function -- Find all instances of #REPLACE-ME# and replace it with descriptive names for your function +- Find all instances of `#REPLACE-FN-NAME#` and replace it with descriptive names for your function - For example, if you are writing a function for a distributed virtual switch, you might name the function `kn-pcli-dvs` - Find all instances of FUNCTION_SECRET and function_secret, replacing it with descriptive names for your function. For example, if you are writing a function for a distributed virtual switch, you might use DVS_SECRET - test/docker-test-env-variable @@ -9,8 +9,8 @@ Delete this section before publishing your new function - function_secret.json (rename the file) - Obtain a new payload file - The example `test/test-payload.json` is a sample event payload file for event type `DvsReconfiguredEvent`. This needs to be replaced with the payload for your specific event. This is easily obtained using the built-in Sockeye service. Browse to the `/events` endpoint of your VEBA deployment and cause your event to trigger. You can then can easily copy and paste the payload from the output in Sockeye. -# kn-pcli-#REPLACE-ME# -Example Knative PowerCLI function #REPLACE-ME# +# kn-pcli-#REPLACE-FN-NAME# +Example Knative PowerCLI function kn-pcli-#REPLACE-FN-NAME# # Step 1 - Build @@ -22,14 +22,14 @@ Create the container image locally to test your function logic. Mac/Linux ``` # change the IMAGE name accordingly, example below for Docker -export IMAGE=/kn-pcli-#REPLACE-ME#:1.0 +export IMAGE=/kn-pcli-#REPLACE-FN-NAME#:1.0 docker build -t ${IMAGE} . ``` Windows ``` # change the IMAGE name accordingly, example below for Docker -$IMAGE="/kn-pcli-#REPLACE-ME#:1.0" +$IMAGE="/kn-pcli-#REPLACE-FN-NAME#:1.0" docker build -t ${IMAGE} . ``` # Step 2 - Test @@ -54,12 +54,12 @@ If you built a custom image in Step 1, comment out the default `IMAGE` command b Mac/Linux ```console -export IMAGE=us.gcr.io/daisy-284300/veba/kn-#REPLACE-ME#:1.0 +export IMAGE=us.gcr.io/daisy-284300/veba/kn-pcli-#REPLACE-FN-NAME#:1.0 docker run -e FUNCTION_DEBUG=true -e PORT=8080 --env-file docker-test-env-variable -it --rm -p 8080:8080 ${IMAGE} ``` Windows ```console -$IMAGE="us.gcr.io/daisy-284300/veba/kn-pcli-#REPLACE-ME#:1.0" +$IMAGE="us.gcr.io/daisy-284300/veba/kn-pcli-#REPLACE-FN-NAME#:1.0" docker run -e FUNCTION_DEBUG=true -e PORT=8080 --env-file docker-test-env-variable -it --rm -p 8080:8080 ${IMAGE} ``` diff --git a/examples/knative/powercli/kn-pcli-template/function.yaml b/examples/knative/powercli/kn-pcli-template/function.yaml index 9b60f13f..cb940697 100644 --- a/examples/knative/powercli/kn-pcli-template/function.yaml +++ b/examples/knative/powercli/kn-pcli-template/function.yaml @@ -1,7 +1,7 @@ apiVersion: serving.knative.dev/v1 kind: Service metadata: - name: kn-pcli-#REPLACE-ME# + name: kn-pcli-#REPLACE-FN-NAME# labels: app: veba-ui spec: @@ -12,7 +12,7 @@ spec: autoscaling.knative.dev/minScale: "1" spec: containers: - - image: us.gcr.io/daisy-284300/veba/kn-pcli-#REPLACE-ME#:1.0 + - image: us.gcr.io/daisy-284300/veba/kn-pcli-#REPLACE-FN-NAME#:1.0 envFrom: - secretRef: name: vds-secret @@ -23,7 +23,7 @@ spec: apiVersion: eventing.knative.dev/v1 kind: Trigger metadata: - name: veba-pcli-#REPLACE-ME#-trigger + name: veba-pcli-#REPLACE-FN-NAME#-trigger labels: app: veba-ui spec: diff --git a/examples/knative/powercli/kn-pcli-template/handler.ps1 b/examples/knative/powercli/kn-pcli-template/handler.ps1 index 87ae785c..9a3e580c 100644 --- a/examples/knative/powercli/kn-pcli-template/handler.ps1 +++ b/examples/knative/powercli/kn-pcli-template/handler.ps1 @@ -84,8 +84,8 @@ Function Process-Handler { # Write-Host "$(Get-Date) - ERROR: " # This is the final line of your custom code. - # Replace #REPLACE-ME# with a meaningful message showing the end of your custom code - #Write-Host "$(Get-Date) - #REPLACE-ME# operation complete ...`n" + # Replace #REPLACE-FN-NAME# with a meaningful message showing the end of your custom code + #Write-Host "$(Get-Date) - #REPLACE-FN-NAME# operation complete ...`n" Write-Host "$(Get-Date) - Handler Processing Completed ...`n" }