From 230c4283445b9c773e33ade18e162909e2b15088 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 10 Nov 2023 11:33:20 +0000 Subject: [PATCH] Update watchdogs to include new header for internal retries Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- template/golang-http/Dockerfile | 6 +++--- template/golang-http/template.yml | 13 +++---------- template/golang-middleware/Dockerfile | 6 +++--- template/golang-middleware/template.yml | 7 ++----- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/template/golang-http/Dockerfile b/template/golang-http/Dockerfile index 59b9d7d..288acfa 100644 --- a/template/golang-http/Dockerfile +++ b/template/golang-http/Dockerfile @@ -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 @@ -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 \ diff --git a/template/golang-http/template.yml b/template/golang-http/template.yml index 7986a83..2edf43a 100644 --- a/template/golang-http/template.yml +++ b/template/golang-http/template.yml @@ -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/ \ No newline at end of file diff --git a/template/golang-middleware/Dockerfile b/template/golang-middleware/Dockerfile index 4ba9c7f..cbba7fe 100644 --- a/template/golang-middleware/Dockerfile +++ b/template/golang-middleware/Dockerfile @@ -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 @@ -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 \ diff --git a/template/golang-middleware/template.yml b/template/golang-middleware/template.yml index 2bb07cb..6881cad 100644 --- a/template/golang-middleware/template.yml +++ b/template/golang-middleware/template.yml @@ -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/