Skip to content

Commit

Permalink
Merge pull request #250 from Edwinhr716/networkConfig-patch
Browse files Browse the repository at this point in the history
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 0596856 + 8c62e01 commit 8fe6644
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 8fe6644

Please sign in to comment.