Skip to content

Commit

Permalink
Merge pull request #252 from Edwinhr716/automated-cherry-pick-of-#250…
Browse files Browse the repository at this point in the history
…-upstream-release-0.4.0

Automated cherry pick of #250: change to not use NetworkConfig in hash calculation if it has default value
  • Loading branch information
k8s-ci-robot authored Nov 7, 2024
2 parents 58c0ac6 + fb7c68f commit d620512
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 d620512

Please sign in to comment.