Skip to content

Commit d620512

Browse files
authored
Merge pull request #252 from Edwinhr716/automated-cherry-pick-of-#250-upstream-release-0.4.0
Automated cherry pick of #250: change to not use NetworkConfig in hash calculation if it has default value
2 parents 58c0ac6 + fb7c68f commit d620512

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/utils/utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func NonZeroValue(value int32) int32 {
4141
}
4242

4343
func LeaderWorkerTemplateHash(lws *leaderworkerset.LeaderWorkerSet) string {
44-
if lws.Spec.NetworkConfig == nil {
44+
if lws.Spec.NetworkConfig == nil || string(*lws.Spec.NetworkConfig.SubdomainPolicy) == string(leaderworkerset.SubdomainShared) {
4545
return Sha1Hash(lws.Spec.LeaderWorkerTemplate.LeaderTemplate.String() +
4646
lws.Spec.LeaderWorkerTemplate.WorkerTemplate.String())
4747
}

0 commit comments

Comments
 (0)