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
Federation apiobject cluster #23847
Federation apiobject cluster #23847
Conversation
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
2 similar comments
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
Can one of the admins verify that this patch is reasonable to test? If so, please reply "ok to test". This message may repeat a few times in short succession due to jenkinsci/ghprb-plugin#292. Sorry. Otherwise, if this message is too spammy, please complain to ixdy. |
) | ||
|
||
type Interface interface { | ||
Discovery() discovery.DiscoveryInterface |
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, @jianhuiz , in cluster-controller and scheduler, we will use this client interface to operate resource. Except cluster and sub-replicaset , we also need relicaset operation. So would you like to define the interface like this?
type Interface interface {
Discovery() discovery.DiscoveryInterface
Core() unversionedcore.CoreInterface
Federation() unversionedfederation.FederationInterface
}
@jianhuiz , |
I agreed on both comments from @huangyuqi, same request here from scheduler, in addition, I had an email to @jianhuiz, we need to define the annotation somewhere in apiobject component, most likely in types.go var ClusterSelectorKey = "kubernetes.io/cluster-names" |
We should move the client changes to a separate PR. @caesarxuchao will be the best reviewer for that. Lets get the APIserver parts correct in this PR. @k8s-bot ok to test. cc @kubernetes/sig-api-machinery @kubernetes/sig-cluster-federation |
@@ -45,10 +46,11 @@ const pkgBase = "k8s.io/kubernetes/pkg" | |||
var ( | |||
functionDest = flag.StringP("funcDest", "f", "-", "Output for conversion functions; '-' means stdout") | |||
groupVersion = flag.StringP("version", "v", "api/v1", "groupPath/version for conversion.") | |||
gvPath = flag.StringP("path", "p", "", "path to the api group version directory, relative path to pkg/apis") |
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.
How about naming it apiTypesPath?
Most of the api machinery changes look good (have added a few comments) Have added a few comments on the API as well. |
unit tests failed on Jenkins with the following error:
|
|
||
func newStorage(t *testing.T) (*REST, *etcdtesting.EtcdTestServer) { | ||
etcdStorage, server := registrytest.NewEtcdStorage(t, federation.GroupName) | ||
restOptions := generic.RESTOptions{etcdStorage, generic.UndecoratedStorage, 1} |
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.
Change this to:
RestOptions{Storage: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1}.
hack/verify-govet.sh is failing because of this
Code changes LGTM. |
Great. tests pass now! |
GCE e2e build/test passed for commit 3bdd413. |
LGTM, thanks! |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 3bdd413. |
Automatic merge from submit-queue |
// ClusterReady means the cluster is ready to accept workloads. | ||
ClusterReady ClusterConditionType = "Ready" | ||
// ClusterOffline means the cluster is temporarily down or not reachable | ||
ClusterOffline ClusterConditionType = "Offline" |
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.
What's the difference between Ready and Offline? And why do they have have the opposite sense? For instance, this isn't this "Online"?
If Offline is about reachability, it should be called Reachable.
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.
I believe when a cluster is ready, then other conditions should be generally false or absent.
When Ready becomes false, there could be one or more conditions that indicate the reason for that.
Offline is about reachability (#19313 Cluster which I can change it to Unreachable if you prefer.
There may be more conditions (reason field also maybe) in the future to indicate the status of an unready cluster (like NodeOutOfDisk for NodeCondition)
Automatic merge from submit-queue Federation client for cluster generate v1alpha1 and unversioned client for federation/clusters #23653, requires #23847, #23998 @nikhiljindal @quinton-hoole @caesarxuchao
Automatic merge from submit-queue Federation kubectl for clusters add federation/clusters resource to kubectl #23653, requires #23847 <!-- Reviewable:start --> --- This change is [<img src="http://reviewable.k8s.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](http://reviewable.k8s.io/reviews/kubernetes/kubernetes/24016) <!-- Reviewable:end -->
add federation api group
add cluster api object and registry
generate cluster clientmoved to #24117update scripts to generate files for /federation
#19313 #23653 #23554
@nikhiljindal @quinton-hoole, @deepak-vij, @XiaoningDing, @alfred-huangjian @mfanjie @huangyuqi @colhom