Skip to content
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

Update vendor #497

Merged
merged 1 commit into from
Sep 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
174 changes: 102 additions & 72 deletions Gopkg.lock

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,25 @@ ignored = ["k8s.io/kubernetes/pkg/api"]

[[constraint]]
name = "k8s.io/api"
# Pin to an unreleased commit because the latest release is not compatible
# with kubernetes/kubernetes:v1.11.0-beta.1.
revision = "dc6e60c1b0483cd8e94610bfacf6989fe55df091"
branch = "master"

# This needs to be an override as it is a non-direct dependency and will not be
# considered by `dep` as a constraint.
[[override]]
name = "k8s.io/apiserver"
revision = "kubernetes-1.12.0-alpha.0"
branch = "master"

[[constraint]]
name = "k8s.io/apimachinery"
revision = "kubernetes-1.12.0-alpha.0"
branch = "master"

[[constraint]]
name = "k8s.io/client-go"
revision = "kubernetes-1.12.0-alpha.0"
branch = "master"

[[constraint]]
name = "k8s.io/kubernetes"
revision = "v1.11.0-beta.1"
branch = "master"

# This needs to be an override as it is a non-direct dependency and will not be
# considered by `dep` as a constraint.
Expand Down
13 changes: 7 additions & 6 deletions cmd/glbc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package main

import (
"context"
"fmt"
"math/rand"
"os"
Expand All @@ -33,7 +34,7 @@ import (
"k8s.io/client-go/tools/record"
backendconfigclient "k8s.io/ingress-gce/pkg/backendconfig/client/clientset/versioned"

"k8s.io/ingress-gce/pkg/context"
ingctx "k8s.io/ingress-gce/pkg/context"
"k8s.io/ingress-gce/pkg/controller"
neg "k8s.io/ingress-gce/pkg/neg"

Expand Down Expand Up @@ -111,7 +112,7 @@ func main() {
cloud := app.NewGCEClient()
enableNEG := flags.F.Features.NEG
defaultBackendServicePortID := app.DefaultBackendServicePortID(kubeClient)
ctxConfig := context.ControllerContextConfig{
ctxConfig := ingctx.ControllerContextConfig{
NEGEnabled: enableNEG,
BackendConfigEnabled: flags.F.EnableBackendConfig,
Namespace: flags.F.WatchNamespace,
Expand All @@ -120,7 +121,7 @@ func main() {
HealthCheckPath: flags.F.HealthCheckPath,
DefaultBackendHealthCheckPath: flags.F.DefaultSvcHealthCheckPath,
}
ctx := context.NewControllerContext(kubeClient, backendConfigClient, cloud, namer, ctxConfig)
ctx := ingctx.NewControllerContext(kubeClient, backendConfigClient, cloud, namer, ctxConfig)
go app.RunHTTPServer(ctx.HealthCheck)

if !flags.F.LeaderElection.LeaderElect {
Expand All @@ -134,7 +135,7 @@ func main() {
if err != nil {
glog.Fatalf("%v", err)
}
leaderelection.RunOrDie(*electionConfig)
leaderelection.RunOrDie(context.Background(), *electionConfig)
}

// makeLeaderElectionConfig builds a leader election configuration. It will
Expand Down Expand Up @@ -164,7 +165,7 @@ func makeLeaderElectionConfig(client clientset.Interface, recorder record.EventR
RenewDeadline: flags.F.LeaderElection.RenewDeadline.Duration,
RetryPeriod: flags.F.LeaderElection.RetryPeriod.Duration,
Callbacks: leaderelection.LeaderCallbacks{
OnStartedLeading: func(_ <-chan struct{}) {
OnStartedLeading: func(context.Context) {
// Since we are committing a suicide after losing
// mastership, we can safely ignore the argument.
run()
Expand All @@ -176,7 +177,7 @@ func makeLeaderElectionConfig(client clientset.Interface, recorder record.EventR
}, nil
}

func runControllers(ctx *context.ControllerContext) {
func runControllers(ctx *ingctx.ControllerContext) {
stopCh := make(chan struct{})
lbc := controller.NewLoadBalancerController(ctx, stopCh)

Expand Down
6 changes: 3 additions & 3 deletions pkg/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (

"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apiserver/pkg/apis/config"
"k8s.io/client-go/tools/leaderelection/resourcelock"
"k8s.io/kubernetes/pkg/apis/componentconfig"
"k8s.io/kubernetes/pkg/client/leaderelectionconfig"
)

Expand Down Expand Up @@ -88,7 +88,7 @@ var (
)

type LeaderElectionConfiguration struct {
componentconfig.LeaderElectionConfiguration
config.LeaderElectionConfiguration

// LockObjectNamespace defines the namespace of the lock object
LockObjectNamespace string
Expand All @@ -98,7 +98,7 @@ type LeaderElectionConfiguration struct {

func defaultLeaderElectionConfiguration() LeaderElectionConfiguration {
return LeaderElectionConfiguration{
LeaderElectionConfiguration: componentconfig.LeaderElectionConfiguration{
LeaderElectionConfiguration: config.LeaderElectionConfiguration{
LeaderElect: true,
LeaseDuration: metav1.Duration{Duration: DefaultLeaseDuration},
RenewDeadline: metav1.Duration{Duration: DefaultRenewDeadline},
Expand Down
Loading