kubernetes-retired / cluster-api-provider-nested

Cluster API Provider for Nested Clusters
Apache License 2.0
301 stars 67 forks source link

Warning: spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master #177

Closed jichenjc closed 3 years ago

jichenjc commented 3 years ago

What steps did you take and what happened: [A clear and concise description on how to REPRODUCE the bug.]

W0715 01:12:23.649661       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:12:23.650673       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:12:23.655967       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master
W0715 01:13:23.661163       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master
W0715 01:13:23.661481       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:13:23.661429       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:14:23.663101       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:14:23.664215       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master
W0715 01:14:23.665586       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:15:23.668071       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:15:23.668166       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master
W0715 01:15:23.668239       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:16:23.669312       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:16:23.670603       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master
W0715 01:16:23.675730       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:17:23.688207       1 checker.go:119] spec of service default-f87c12-vc-sample-23-default/kubernetes diff in super&tenant master
W0715 01:17:23.690478       1 checker.go:119] spec of service default-b9bf25-vc-sample-1-default/kubernetes diff in super&tenant master
W0715 01:17:23.703821       1 checker.go:119] spec of service default-316569-vc-sample-2-default/kubernetes diff in super&tenant master

looks like every min we got one such warning which is annoying and confusing

What did you expect to happen:

Anything else you would like to add: [Miscellaneous information that will assist in solving the issue.]

Environment:

/kind bug [One or more /area label. See https://github.com/kubernetes-sigs/cluster-api-provider-nested/labels?q=area for the list of labels]

jichenjc commented 3 years ago

/assign

jichenjc commented 3 years ago

looks like we are expecting deep equal here

https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/pkg/syncer/conversion/equality.go

but my test shows

spec:
  clusterIP: 10.99.20.208
  clusterIPs:
  - 10.99.20.208
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: https
    port: 443
    protocol: TCP
    targetPort: 6443
  sessionAffinity: None
  type: ClusterIP

spec:
  clusterIP: 10.32.0.1
  ports:
  - name: https
    port: 443
    protocol: TCP
    targetPort: 6443
  sessionAffinity: None
  type: ClusterIP

and we hard code the clusterIP https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/pkg/syncer/conversion/equality.go#L678

so might need consider why following and how to handle

ipFamilies: