Skip to content
This repository has been archived by the owner on Mar 10, 2023. It is now read-only.

Commit

Permalink
Add echo function so its built multiarch
Browse files Browse the repository at this point in the history
Signed-off-by: Alistair Hey <alistair@heyal.co.uk>
  • Loading branch information
Waterdrips authored and alexellis committed Nov 27, 2020
1 parent 9d9f9b7 commit 9b608af
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion chart/openfaas-cloud/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ofBuilder:
replicas: 1

buildKit:
image: moby/buildkit:v0.6.2
image: moby/buildkit:v0.7.2
privileged: true


Expand Down
2 changes: 1 addition & 1 deletion chart/test/core_of_builder_dep_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ func Test_CoreOFBuilderDep_NonHttpProbe(t *testing.T) {
"--set", "buildKit.privileged=false",
}

want := makeOFBuilderDep(false, true, 5, "false", "moby/buildkit:v0.6.2")
want := makeOFBuilderDep(false, true, 5, "false", "moby/buildkit:v0.7.2")
runYamlTest(parts, "./tmp/openfaas-cloud/templates/ofc-core/of-builder-dep.yaml", want, t)
}

Expand Down
10 changes: 10 additions & 0 deletions echo/handler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package function

import (
"fmt"
)

// Handle a serverless request
func Handle(req []byte) string {
return fmt.Sprintf("%s", string(req))
}
35 changes: 18 additions & 17 deletions stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ functions:
read_debug: true
combine_output: false
validate_hmac: true
debug_token: true
debug_token: false
environment_file:
- gateway_config.yml
- github.yml
Expand Down Expand Up @@ -247,22 +247,6 @@ functions:
memory: 32Mi
cpu: 50m

echo:
skip_build: true
image: functions/alpine:latest
fprocess: cat
labels:
openfaas-cloud: "1"
com.openfaas.scale.zero: false
environment:
write_debug: true
read_debug: true
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

metrics:
lang: go
handler: ./metrics
Expand Down Expand Up @@ -302,3 +286,20 @@ functions:
requests:
memory: 32Mi
cpu: 50m

echo:
lang: go
handler: ./echo
image: ghcr.io/${REPO:-openfaas}/ofc-echo:${TAG:-dev}
labels:
openfaas-cloud: "1"
com.openfaas.scale.zero: false
environment:
write_debug: true
read_debug: true
limits:
memory: 128Mi
requests:
memory: 32Mi
cpu: 50m

0 comments on commit 9b608af

Please sign in to comment.