Skip to content

Commit

Permalink
Don't sync license in airgap mode
Browse files Browse the repository at this point in the history
  • Loading branch information
divolgin committed Sep 11, 2020
1 parent 6a37fb3 commit cb7c9a7
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions kotsadm/pkg/automation/automation.go
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
"strconv"
"strings"

"github.com/pkg/errors"
Expand Down Expand Up @@ -68,13 +69,17 @@ func AutomateInstall() error {
continue
}

// sync license
latestLicense, err := kotslicense.GetLatestLicense(verifiedLicense)
if err != nil {
logger.Error(err)
continue
disableOutboundConnections := false
// ignore the error, default to false
disableOutboundConnections, _ = strconv.ParseBool(os.Getenv("DISABLE_OUTBOUND_CONNECTIONS"))
if !disableOutboundConnections {
latestLicense, err := kotslicense.GetLatestLicense(verifiedLicense)
if err != nil {
logger.Error(err)
continue
}
verifiedLicense = latestLicense
}
verifiedLicense = latestLicense

// check license expiration
expired, err := kotspull.LicenseIsExpired(verifiedLicense)
Expand Down

0 comments on commit cb7c9a7

Please sign in to comment.