From 1f57394653c99b01a7083c4074fb31d031fb6f61 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Thu, 21 Nov 2019 06:26:24 -0800 Subject: [PATCH] Add flag to switch pro image Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- main.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 2e413f87..c1aea8f3 100644 --- a/main.go +++ b/main.go @@ -47,7 +47,8 @@ func (i InfraConfig) UsePro() bool { } type InletsProConfig struct { - License string + License string + ClientImage string } func init() { @@ -69,6 +70,8 @@ func main() { flag.StringVar(&infra.OrganizationID, "organization-id", "", "The organization id if using Scaleway as the provider") flag.StringVar(&infra.ProjectID, "project-id", "", "The project ID if using Packet.com as the provider") flag.StringVar(&infra.ProConfig.License, "license", "", "Supply a license for use with inlets-pro") + flag.StringVar(&infra.ProConfig.ClientImage, "pro-client-image", "", "Supply a Docker image for the inlets-pro client") + flag.BoolVar(&infra.AnnotatedOnly, "annotated-only", false, "Only create a tunnel for annotated services. Annotate with dev.inlets.manage=true.") flag.Parse() @@ -118,6 +121,10 @@ func main() { // GetInletsClientImage returns the image for the client-side tunnel func (i *InfraConfig) GetInletsClientImage() string { if i.UsePro() { + if len(i.ProConfig.ClientImage) > 0 { + return i.ProConfig.ClientImage + } + return "alexellis2/inlets-pro:0.4" } if i.InletsClientImage == "" {