-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Migrate to client-go #539
Migrate to client-go #539
Conversation
@aledbf There are a lot of gaps in my k8s knowledge outside of the GLBC and services, so please be patient with me on this. We can also try pinging @bprashanth if he has any spare time to help overlook this. (Not a problem if he doesn't) First, have you tried testing a simple gce use case with this branch? Thanks |
Yes but I don't know if there is an additional e2e test for the gce ingress controller outside this repo.
From the compatibility matrix this should not be an issue
The issue here is that the leader election code is not (yet) present in client-go and we rely on this feature for the ingress status update (the gce ingress controller does not uses this code) |
@bprashanth can you help to review this PR? (the gce part) |
He can look at the GCE changes, but I was actually concerned about core/pkg/... as I'm not familiar with it.
The compatibility matrix says client-go contains items that may not exist in the cluster. I was asking if you were only using things in common. |
Also, being able to cherrypick kubernetes/kubernetes#43644 into 1.6.x is looking less likely and 1.7 is months out. Although not ideal, I feel it would be innocuous to vendor from commit 289ef62442b2e74e533e2b0f1e309c70750d7423. Pinging @thockin to provide his input on this. |
@@ -52,8 +52,9 @@ func defaultBackendName(clusterName string) string { | |||
|
|||
// newLoadBalancerController create a loadbalancer controller. | |||
func newLoadBalancerController(t *testing.T, cm *fakeClusterManager, masterURL string) *LoadBalancerController { |
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.
masterURL
is declared but not used.
client := client.NewForConfigOrDie(&restclient.Config{Host: masterURL, ContentConfig: restclient.ContentConfig{GroupVersion: testapi.Default.GroupVersion()}}) | ||
lb, err := NewLoadBalancerController(client, cm.ClusterManager, 1*time.Second, api.NamespaceAll) | ||
kubeClient := fake.NewSimpleClientset() | ||
//ContentConfig: restclient.ContentConfig{GroupVersion: testapi_v1.Default.GroupVersion()} |
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.
Was this kept for a reason?
Yeah, it seems untenable to have ingress depend on kubernetes but on vendor
stable release versions - doing anything that moves them forward in tandem
is problematic. In the end, cloud provider stuff will be moved out of
kubernetes tree anyway..
…On Mon, Apr 3, 2017 at 4:05 PM, Nick Sardo ***@***.***> wrote:
Also, being able to cherrypick kubernetes/kubernetes#43644
<kubernetes/kubernetes#43644> into 1.6.1 is
looking less likely and 1.7 is months out. Although not ideal, I feel it
would be innocuous to vendor from commit 289ef62442b2e74e533e2b0f1e309c70750d7423.
Pinging @thockin <https://github.com/thockin> to provide his input on
this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#539 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVL37hzGmrzx4xc2JyPfE3vTUSXNdks5rsXtPgaJpZM4Mwgq8>
.
|
19c727f
to
533c10d
Compare
Coverage increased (+0.3%) to 44.341% when pulling 533c10dcbacdca90d6b0d56bcb6ef8569ea6c625 on aledbf:migrate-client-go into 22c3226 on kubernetes:master. |
@thockin which version of client-go should be used? |
I think client-go can be more stable - it changes less often, and generally
major changes in client are related to major changes in server..
…On Tue, Apr 4, 2017 at 8:23 AM, Manuel Alejandro de Brito Fontes < ***@***.***> wrote:
@thockin <https://github.com/thockin> which version of client-go should
be used?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#539 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVD12-ydYjWxextxsA6r-71nEk8pfks5rsmBUgaJpZM4Mwgq8>
.
|
@thockin sorry, I meant which branch of the repository |
We should use whichever branch is stable - as of a few weeks ago there was
a proposal to make `master` be stable and do dev in another branch. Unless
there's a reason to pull a non-stable version of that?
…On Tue, Apr 4, 2017 at 9:15 AM, Manuel Alejandro de Brito Fontes < ***@***.***> wrote:
@thockin <https://github.com/thockin> sorry, I meant which branch of the
repository kubernetes/client-go should be used (this PR is now using the
master branch)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#539 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFVgVI4fkmBMAA-emiaAbupkFxj8ICcxks5rsmyjgaJpZM4Mwgq8>
.
|
533c10d
to
88a2751
Compare
@nicksardo done |
@aledbf Is there a required configuration change to the manifest file in k8s? The controller crashes at start in an e2e cluster.
|
controllers/gce/main.go
Outdated
config, err = clientConfig.ClientConfig() | ||
config, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( | ||
&clientcmd.ClientConfigLoadingRules{}, | ||
&clientcmd.ConfigOverrides{}).ClientConfig() |
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.
Now that clientcmd.ClusterDefault
is being deprecated, I assume we should either specify the master address via (new) flag or assume in-cluster (similar to nginx controller). I think we can make this change - will need to remember this when bumping the manifest file.
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.
done
Changes in I've ran one successful test on a 1.6 cluster with the new flag. After doing a test on a 1.4 cluster, I'll merge this. I'll update controller docs regarding the new flag(s) in a separate PR. |
No problems with 1.4 |
Thanks for updating the vendored k8s! |
@nicksardo thank you for merging :) |
replaces #463