Skip to content

Commit

Permalink
Bugfix: do not ignore agentCheckinInterval
Browse files Browse the repository at this point in the history
Signed-off-by: Silvio Moioli <[email protected]>
  • Loading branch information
moio committed Nov 4, 2022
1 parent 8d1ce20 commit 10a1d2f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func AgentWithConfig(ctx context.Context, agentNamespace, controllerNamespace, a
mo.AgentImage = cfg.AgentImage
mo.SystemDefaultRegistry = cfg.SystemDefaultRegistry
mo.AgentImagePullPolicy = cfg.AgentImagePullPolicy
mo.CheckinInterval = cfg.AgentCheckinInternal.Duration.String()
mo.CheckinInterval = cfg.AgentCheckinInterval.Duration.String()

objs = append(objs, Manifest(agentNamespace, agentScope, mo)...)

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type Config struct {
AgentImage string `json:"agentImage,omitempty"`
AgentImagePullPolicy string `json:"agentImagePullPolicy,omitempty"`
SystemDefaultRegistry string `json:"systemDefaultRegistry,omitempty"`
AgentCheckinInternal metav1.Duration `json:"agentCheckinInternal,omitempty"`
AgentCheckinInterval metav1.Duration `json:"agentCheckinInterval,omitempty"`
ManageAgent *bool `json:"manageAgent,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
ClientID string `json:"clientID,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/cluster/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (i *importHandler) importCluster(cluster *fleet.Cluster, status fleet.Clust
},
ManifestOptions: agent.ManifestOptions{
AgentEnvVars: cluster.Spec.AgentEnvVars,
CheckinInterval: cfg.AgentCheckinInternal.Duration.String(),
CheckinInterval: cfg.AgentCheckinInterval.Duration.String(),
Generation: string(cluster.UID) + "-" + strconv.FormatInt(cluster.Generation, 10),
PrivateRepoURL: cluster.Spec.PrivateRepoURL,
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/manageagent/manageagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (h *handler) newAgentBundle(ns string, cluster *fleet.Cluster) (runtime.Obj
AgentEnvVars: cluster.Spec.AgentEnvVars,
AgentImage: cfg.AgentImage,
AgentImagePullPolicy: cfg.AgentImagePullPolicy,
CheckinInterval: cfg.AgentCheckinInternal.Duration.String(),
CheckinInterval: cfg.AgentCheckinInterval.Duration.String(),
Generation: "bundle",
PrivateRepoURL: cluster.Spec.PrivateRepoURL,
SystemDefaultRegistry: cfg.SystemDefaultRegistry,
Expand Down

0 comments on commit 10a1d2f

Please sign in to comment.