Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/autoupdate/agent/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ import (
"github.com/gravitational/teleport/lib/autoupdate"
)

const (
// defaultSetting is used to represent the default value for updater config.
defaultSetting = "default"
)

const (
// updateConfigName specifies the name of the file inside versionsDirName containing configuration for the teleport update.
updateConfigName = "update.yaml"
Expand Down Expand Up @@ -228,7 +233,7 @@ func overrideOptional(orig, override string) string {
switch override {
case "":
return orig
case "default":
case defaultSetting:
return ""
default:
return override
Expand Down
3 changes: 3 additions & 0 deletions lib/autoupdate/agent/integrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ func ReadHelloUpdaterInfo(ctx context.Context, log *slog.Logger, hostUUID string
}

info.UpdateGroup = cfg.Spec.Group
if info.UpdateGroup == "" {
info.UpdateGroup = defaultSetting
}
if p := cfg.Status.IDFile; p != "" {
machineID, err := os.ReadFile(systemdMachineIDFile)
if err != nil && !errors.Is(err, fs.ErrNotExist) {
Expand Down
2 changes: 1 addition & 1 deletion lib/autoupdate/agent/updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ func (u *Updater) find(ctx context.Context, cfg *UpdateConfig, id string) (FindR
}
group := cfg.Spec.Group
if group == "" {
group = "default"
group = defaultSetting
}
resp, err := webclient.Find(&webclient.Config{
Context: ctx,
Expand Down
Loading