Skip to content

Commit

Permalink
change to not use NetworkConfig in hash calculation if it has default…
Browse files Browse the repository at this point in the history
… value
  • Loading branch information
Edwinhr716 committed Nov 7, 2024
1 parent 58c0ac6 commit fb7c68f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func NonZeroValue(value int32) int32 {
}

func LeaderWorkerTemplateHash(lws *leaderworkerset.LeaderWorkerSet) string {
if lws.Spec.NetworkConfig == nil {
if lws.Spec.NetworkConfig == nil || string(*lws.Spec.NetworkConfig.SubdomainPolicy) == string(leaderworkerset.SubdomainShared) {
return Sha1Hash(lws.Spec.LeaderWorkerTemplate.LeaderTemplate.String() +
lws.Spec.LeaderWorkerTemplate.WorkerTemplate.String())
}
Expand Down

0 comments on commit fb7c68f

Please sign in to comment.