Skip to content

Commit 1f57394

Browse files
committed
Add flag to switch pro image
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent c8ebca2 commit 1f57394

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ func (i InfraConfig) UsePro() bool {
4747
}
4848

4949
type InletsProConfig struct {
50-
License string
50+
License string
51+
ClientImage string
5152
}
5253

5354
func init() {
@@ -69,6 +70,8 @@ func main() {
6970
flag.StringVar(&infra.OrganizationID, "organization-id", "", "The organization id if using Scaleway as the provider")
7071
flag.StringVar(&infra.ProjectID, "project-id", "", "The project ID if using Packet.com as the provider")
7172
flag.StringVar(&infra.ProConfig.License, "license", "", "Supply a license for use with inlets-pro")
73+
flag.StringVar(&infra.ProConfig.ClientImage, "pro-client-image", "", "Supply a Docker image for the inlets-pro client")
74+
7275
flag.BoolVar(&infra.AnnotatedOnly, "annotated-only", false, "Only create a tunnel for annotated services. Annotate with dev.inlets.manage=true.")
7376

7477
flag.Parse()
@@ -118,6 +121,10 @@ func main() {
118121
// GetInletsClientImage returns the image for the client-side tunnel
119122
func (i *InfraConfig) GetInletsClientImage() string {
120123
if i.UsePro() {
124+
if len(i.ProConfig.ClientImage) > 0 {
125+
return i.ProConfig.ClientImage
126+
}
127+
121128
return "alexellis2/inlets-pro:0.4"
122129
}
123130
if i.InletsClientImage == "" {

0 commit comments

Comments
 (0)