Skip to content

Commit

Permalink
Add flag to switch pro image
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
  • Loading branch information
alexellis committed Nov 21, 2019
1 parent c8ebca2 commit 1f57394
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func (i InfraConfig) UsePro() bool {
}

type InletsProConfig struct {
License string
License string
ClientImage string
}

func init() {
Expand All @@ -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()
Expand Down Expand Up @@ -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 == "" {
Expand Down

0 comments on commit 1f57394

Please sign in to comment.