From ff45af90ad489a7cf484e3fb145e4a87b772f4bb Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Tue, 4 Feb 2020 13:11:38 +0000 Subject: [PATCH] Fix Dockerfile for multi-stage build Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- Dockerfile | 2 +- artifacts/nodeinfo-ingress-traefik.yaml | 9 +++++++++ main.go | 1 + 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 artifacts/nodeinfo-ingress-traefik.yaml diff --git a/Dockerfile b/Dockerfile index 8ad71b83..cc0098ff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM teamserverless/license-check:0.3.6 as license-check -FROM golang:1.13 as build +FROM golang:1.13 as builder ENV CGO_ENABLED=0 ENV GO111MODULE=on ENV GOFLAGS=-mod=vendor diff --git a/artifacts/nodeinfo-ingress-traefik.yaml b/artifacts/nodeinfo-ingress-traefik.yaml new file mode 100644 index 00000000..fb5a8970 --- /dev/null +++ b/artifacts/nodeinfo-ingress-traefik.yaml @@ -0,0 +1,9 @@ +apiVersion: openfaas.com/v1alpha2 +kind: FunctionIngress +metadata: + name: nodeinfo + namespace: openfaas +spec: + domain: "nodeinfo.myfaas.club" + function: "nodeinfo" + ingressType: "traefik" diff --git a/main.go b/main.go index a07cac40..8dd30bd1 100644 --- a/main.go +++ b/main.go @@ -33,6 +33,7 @@ var pullPolicyOptions = map[string]bool{ func init() { flag.StringVar(&kubeconfig, "kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.") flag.StringVar(&masterURL, "master", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.") + flag.Bool("logtostderr", false, "logtostderrĀ legacy flag") } func main() {