Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix event processing during bootup #240

Merged
merged 5 commits into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Refactor
  • Loading branch information
aattuluri committed Jul 5, 2022
commit f2ce556a08cc9c5f543057bcccbc43252ab9cb8e
7 changes: 0 additions & 7 deletions admiral/pkg/clusters/serviceentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ func createServiceEntry(event admiral.EventType, rc *RemoteController, admiralCa
return tmpSe
}

func IsCacheWarmupTime(remoteRegistry *RemoteRegistry) bool {
if time.Since(remoteRegistry.StartTime) < common.GetAdmiralParams().CacheRefreshDuration {
return true
}
return false
}

func modifyServiceEntryForNewServiceOrPod(event admiral.EventType, env string, sourceIdentity string, remoteRegistry *RemoteRegistry) map[string]*networking.ServiceEntry {

defer util.LogElapsedTime("modifyServiceEntryForNewServiceOrPod", sourceIdentity, env, "")()
Expand Down
5 changes: 5 additions & 0 deletions admiral/pkg/clusters/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
k8sV1 "k8s.io/api/core/v1"
"strconv"
"strings"
"time"
)

func GetMeshPorts(clusterName string, destService *k8sV1.Service,
Expand Down Expand Up @@ -127,3 +128,7 @@ func ValidateConfigmapBeforePutting(cm *k8sV1.ConfigMap) error {
}
return nil
}

func IsCacheWarmupTime(remoteRegistry *RemoteRegistry) bool {
return time.Since(remoteRegistry.StartTime) < common.GetAdmiralParams().CacheRefreshDuration
}