Skip to content

Commit

Permalink
fix cache manager panic in yurthub (#1951)
Browse files Browse the repository at this point in the history
(cherry picked from commit 3de0034)

Co-authored-by: rambohe-ch <[email protected]>
  • Loading branch information
github-actions[bot] and rambohe-ch authored Feb 20, 2024
1 parent c1a4760 commit e60f4c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/yurthub/filter/approver.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ func (a *approver) updateConfigMap(oldObj, newObj interface{}) {
if !ok {
return
}
oldCM = oldCM.DeepCopy()

newCM, ok := newObj.(*corev1.ConfigMap)
if !ok {
return
}
newCM = newCM.DeepCopy()

// request settings are changed or not
needUpdated := a.requestSettingsUpdated(oldCM.Data, newCM.Data)
Expand Down

0 comments on commit e60f4c0

Please sign in to comment.