Skip to content

Commit

Permalink
Update watchdogs to include new header for internal retries
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Nov 10, 2023
1 parent b8b4362 commit 230c428
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
6 changes: 3 additions & 3 deletions template/golang-http/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20-alpine as build
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.13 as watchdog
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-alpine as build

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down Expand Up @@ -37,7 +37,7 @@ WORKDIR /go/src/handler
RUN CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} GOFLAGS=${GOFLAGS} \
go build --ldflags "-s -w" -o handler .

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.2 as ship
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.4 as ship
# Add non root user and certs

RUN apk --no-cache add ca-certificates \
Expand Down
13 changes: 3 additions & 10 deletions template/golang-http/template.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
language: golang-http
fprocess: ./handler
welcome_message: |
You have created a new function which uses Go 1.19 and Alpine
Linux as its base image.
This template is now deprecated, use the golang-middleware
template instead.
To disable the go module, for private vendor code, please use
"--build-arg GO111MODULE=off" with faas-cli build or configure this
via your stack.yml file.
See more: https://docs.openfaas.com/cli/templates/
For the template's repo and more examples:
https://github.com/openfaas/golang-http-template
https://docs.openfaas.com/languages/go/
6 changes: 3 additions & 3 deletions template/golang-middleware/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.11 as watchdog
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.20-alpine as build
FROM --platform=${TARGETPLATFORM:-linux/amd64} ghcr.io/openfaas/of-watchdog:0.9.13 as watchdog
FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.21-alpine as build

ARG TARGETPLATFORM
ARG BUILDPLATFORM
Expand Down Expand Up @@ -34,7 +34,7 @@ WORKDIR /go/src/handler
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
go build --ldflags "-s -w" -o handler .

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.2 as ship
FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine:3.18.4 as ship

# Add non root user and certs
RUN apk --no-cache add ca-certificates \
Expand Down
7 changes: 2 additions & 5 deletions template/golang-middleware/template.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
language: golang-middleware
fprocess: ./handler
welcome_message: |
You have created a new function which uses Go 1.19 and Alpine
You have created a new function which uses Go 1.21 and Alpine
Linux as its base image.
To disable the go module, for private vendor code, please use
"--build-arg GO111MODULE=off" with faas-cli build or configure this
via your stack.yml file.
See more: https://docs.openfaas.com/cli/templates/
For the template's repo and more examples:
https://github.com/openfaas/golang-http-template
Learn more: https://docs.openfaas.com/languages/go/

0 comments on commit 230c428

Please sign in to comment.