-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add clusterProfile status fields #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add clusterProfile status fields #321
Conversation
8248438 to
1230ba6
Compare
633304e to
ebc35bc
Compare
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
ebc35bc to
f78cdf2
Compare
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
8ca2158 to
d0853a5
Compare
Signed-off-by: Ryan Zhang <yangzhangrice@hotmail.com>
b870cf4 to
1985d16
Compare
| now := time.Now() | ||
|
|
||
| // Check if we have a cached version that is still valid. | ||
| p.k8sVersionMutex.RLock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ryan! Not really a comment or something to change, but it seems that a simple mutex would suffice here :)
michaelawyu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments, otherwise LGTM.
| } | ||
|
|
||
| // mockDiscoveryClient is a mock implementation of the discovery.ServerVersionInterface. | ||
| type mockDiscoveryClient struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ryan! Just a nit: discoveryClient seems to have a fake implementation in the client-go package: https://github.com/kubernetes/client-go/blob/d033c497ffef47be9b4f81abde5c3d94dd78089a/discovery/fake/discovery.go#L38.
| NodeCountProperty = "kubernetes-fleet.io/node-count" | ||
|
|
||
| // K8sVersionProperty is a property that describes the Kubernetes version of the cluster. | ||
| K8sVersionProperty = "k8s.io/k8s-version" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ryan! Just a nit here: I vaguely recall that earlier we were told not to use anything with k8s.io or kubernetes.io in the names; instead all non-Azure properties switched to kubernetes-fleet.io; I don't remember the reasoning behind this though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is designed as an upstream properrty
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
|
The work applier IT failure is kind of interesting... The issue is that the system finds an unexpected diff in the This happens because a) with 0.34 API the and as a result when we do the comparison the system will find an extra field and complain about the diff accordingly |
Description of your changes
Add k8s version and cluster api-server to the clusterProfile status by fetching them from the member agent side.
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer