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

Introduce MultiClusterContext as part of ControllerContext #203

Merged
merged 2 commits into from
Apr 12, 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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 63 additions & 7 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ ignored = ["k8s.io/kubernetes/pkg/api"]
branch = "master"
name = "k8s.io/cluster-registry"

[[constraint]]
branch = "master"
name = "k8s.io/kube-openapi"

[prune]
go-tests = true
unused-packages = true


12 changes: 11 additions & 1 deletion pkg/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ import (
corev1 "k8s.io/client-go/kubernetes/typed/core/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/client-go/tools/record"
crclient "k8s.io/cluster-registry/pkg/client/clientset_generated/clientset"
)

// ControllerContext holds
// ControllerContext holds resources necessary for the general
// workflow of the controller.
type ControllerContext struct {
kubeClient kubernetes.Interface

Expand All @@ -43,6 +45,14 @@ type ControllerContext struct {

// Map of namespace => record.EventRecorder.
recorders map[string]record.EventRecorder

MCContext MultiClusterContext
}

// MultiClusterContext holds resource necessary for MCI mode.
type MultiClusterContext struct {
crClient crclient.Interface
ClusterInformer cache.SharedIndexInformer
}

// NewControllerContext returns a new shared set of informers.
Expand Down
5 changes: 5 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/.travis.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 187 additions & 0 deletions vendor/github.com/PuerkitoBio/purell/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading