Skip to content

Commit ed0bcc7

Browse files
committed
Update inlets PRO version to latest, and add flag
Flag allows override - version 0.8.6 is the new default which checks DNS before trying to get TLS certs from Let's Encrypt Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent cc3a495 commit ed0bcc7

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

cmd/create.go

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/spf13/cobra"
2020
)
2121

22-
const inletsPROVersion = "0.8.3"
22+
const inletsProDefaultVersion = "0.8.6"
2323
const inletsProControlPort = 8123
2424

2525
func init() {
@@ -55,6 +55,9 @@ func init() {
5555
createCmd.Flags().Bool("pro", true, `Provision an exit-server with inlets PRO (Deprecated)`)
5656
_ = createCmd.Flags().MarkHidden("pro")
5757
createCmd.Flags().DurationP("poll", "n", time.Second*2, "poll every N seconds, use a higher value if you encounter rate-limiting")
58+
59+
createCmd.Flags().String("inlets-pro-version", inletsProDefaultVersion, `Binary release version for inlets PRO`)
60+
5861
}
5962

6063
// clientCmd represents the client sub command.
@@ -234,17 +237,25 @@ func runCreate(cmd *cobra.Command, _ []string) error {
234237
}
235238
}
236239

240+
inletsProVersion, err := cmd.Flags().GetString("inlets-pro-version")
241+
if err != nil {
242+
return err
243+
}
244+
if len(inletsProVersion) == 0 {
245+
inletsProVersion = inletsProDefaultVersion
246+
}
247+
237248
name := strings.Replace(names.GetRandomName(10), "_", "-", -1)
238249

239250
var userData string
240251
if len(letsencryptDomains) > 0 {
241252
userData = MakeHTTPSUserdata(inletsToken,
242-
inletsPROVersion,
253+
inletsProVersion,
243254
letsencryptEmail, letsencryptIssuer, letsencryptDomains)
244255
} else {
245256
userData = provision.MakeExitServerUserdata(
246257
inletsToken,
247-
inletsPROVersion)
258+
inletsProVersion)
248259
}
249260

250261
hostReq, err := createHost(provider,
@@ -318,7 +329,7 @@ inlets-pro http client --url "wss://%s:%d" \
318329
To delete:
319330
inletsctl delete --provider %s --id "%s"
320331
`,
321-
inletsPROVersion,
332+
inletsProVersion,
322333
hostStatus.IP,
323334
letsencryptDomains,
324335
inletsToken,
@@ -354,7 +365,7 @@ inlets-pro tcp client --url "wss://%s:%d" \
354365
To delete:
355366
inletsctl delete --provider %s --id "%s"
356367
`,
357-
inletsPROVersion,
368+
inletsProVersion,
358369
hostStatus.IP,
359370
inletsToken,
360371
hostStatus.IP,

0 commit comments

Comments
 (0)