hotfix: gen envoy rule id by ns and resource uid (#500)

* hotfix: gen envoy rule id by ns and uid
This commit is contained in:
naison
2025-03-30 20:57:11 +08:00
committed by GitHub
parent 208f607f03
commit cd68b1fb00
16 changed files with 71 additions and 47 deletions

View File

@@ -57,7 +57,7 @@ func (p *Processor) ProcessFile(file NotifyMessage) error {
if len(config.Uid) == 0 {
continue
}
uid := fmt.Sprintf("%s_%s", config.Namespace, config.Uid)
uid := util.GenEnvoyUID(config.Namespace, config.Uid)
lastConfig, ok := p.expireCache.Get(uid)
if ok && reflect.DeepEqual(lastConfig.(*Virtual), config) {
marshal, _ := json.Marshal(config)