Skip to content

Commit

Permalink
change
Browse files Browse the repository at this point in the history
Signed-off-by: SudhanshuBawane <[email protected]>
  • Loading branch information
SudhanshuBawane committed Feb 22, 2024
1 parent c968c10 commit 0311466
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion backend/agentd/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func (s *Session) sender() {
for {
var msg *transport.Message
select {
//sudhanshu#2608 ---- user -----
//2608 ---- user -----
case u := <-s.userConfig.updatesChannel:
var usr *corev2.User
watchEvent, ok := u.(*store.WatchEventUserConfig)
Expand Down
8 changes: 4 additions & 4 deletions backend/agentd/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,17 @@ func GetUserConfigWatcher(ctx context.Context, client *clientv3.Client) <-chan s
}

// Remove the managed_by label if the value is sensu-agent, in case the user is disabled
if userConfig.GetMetadata().Labels[corev2.ManagedByLabel] == "sensu-agent" {
delete(userConfig.GetMetadata().Labels, corev2.ManagedByLabel)
}
//if userConfig.GetMetadata().Labels[corev2.ManagedByLabel] == "sensu-agent" {
// delete(userConfig.GetMetadata().Labels, corev2.ManagedByLabel)
//}

if userConfig.Disabled {
agent.GracefulShutdown(cancel)
}

ch <- store.WatchEventUserConfig{
Action: response.Type,
User: &userConfig,
Action: response.Type,
}
}
}()
Expand Down

0 comments on commit 0311466

Please sign in to comment.