Skip to content

Commit

Permalink
warn on known edition
Browse files Browse the repository at this point in the history
  • Loading branch information
sclevine committed Nov 8, 2024
1 parent c33ef8d commit 188c2a6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/autoupdate/agent/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import (

"github.com/gravitational/teleport/api/client/webclient"
libdefaults "github.com/gravitational/teleport/lib/defaults"
"github.com/gravitational/teleport/lib/modules"
libutils "github.com/gravitational/teleport/lib/utils"
)

Expand Down Expand Up @@ -293,8 +294,12 @@ func (u *Updater) Enable(ctx context.Context, override OverrideConfig) error {
return trace.Errorf("failed to request version from proxy: %w", err)
}
targetVersion = resp.AutoUpdate.AgentVersion
if resp.Edition == "ent" {
switch resp.Edition {
case modules.BuildEnterprise:
flags |= FlagEnterprise
case modules.BuildOSS, modules.BuildCommunity:
default:
u.Log.WarnContext(ctx, "Unknown edition detected, defaulting to community.", "edition", resp.Edition)
}
if resp.FIPS {
flags |= FlagFIPS
Expand Down

0 comments on commit 188c2a6

Please sign in to comment.