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

Kube 1.4 cherry picks #11642

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0b322f9
bump(github.com/google/cadvisor): 0cdf4912793fac9990de3790c273342ec31…
soltysh Oct 28, 2016
5057dc1
UPSTREAM: 33086: Fix possible panic in PodAffinityChecker
soltysh Oct 28, 2016
f7268ad
UPSTREAM: 33170: Remove closing audit log file and add error check wh…
soltysh Oct 28, 2016
ef4569f
UPSTREAM: 33346: disallow user to update loadbalancerSourceRanges
soltysh Oct 28, 2016
836eb43
UPSTREAM: 32807: Fix race condition in setting node statusUpdateNeede…
soltysh Oct 28, 2016
de98767
UPSTREAM: 32914: Limit the number of names per image reported in the …
soltysh Oct 28, 2016
fff5b28
UPSTREAM: 33796: Fix issue in updating device path when volume is att…
soltysh Oct 28, 2016
3298cfa
UPSTREAM: 33735: Fixes in HPA: consider only running pods; proper den…
soltysh Oct 28, 2016
8fa403c
UPSTREAM: 33968: scheduler: initialize podsWithAffinity
soltysh Oct 28, 2016
72217b6
UPSTREAM: 34076: Remove headers that are unnecessary for proxy target
soltysh Oct 28, 2016
16809da
UPSTREAM: 34694: Handle DeletedFinalStateUnknown in NodeController
soltysh Oct 28, 2016
c35ab27
UPSTREAM: 34809: NodeController waits for informer sync before doing …
soltysh Oct 28, 2016
4f830f3
UPSTREAM: 34251: Fix nil pointer issue when getting metrics from volu…
soltysh Oct 28, 2016
5b39af7
UPSTREAM: 34851: Only wait for cache syncs once in NodeController
soltysh Oct 28, 2016
4ded5a2
UPSTREAM: 34895: Fix non-starting node controller in 1.4 branch
soltysh Oct 28, 2016
cfad37d
UPSTREAM: 34955: HPA: fixed wrong count for target replicas calculations
soltysh Oct 28, 2016
d2da288
UPSTREAM: 35071: Change merge key for VolumeMount to mountPath
soltysh Oct 28, 2016
cd49d55
UPSTREAM: 35273: Fixed mutation warning in Attach/Detach controller
soltysh Oct 28, 2016
0b478e6
UPSTREAM: 34368: Node status updater should SetNodeStatusUpdateNeeded…
soltysh Oct 28, 2016
4d92913
bump(github.com/openshift/source-to-image): 2dffea37104471547b8653074…
soltysh Oct 31, 2016
f5bfb96
bump(github.com/google/cadvisor): ef63d70156d509efbbacfc3e86ed120228f…
soltysh Oct 31, 2016
11cd90d
UPSTREAM: 33806: Update cAdvisor godeps for v1.4.1
soltysh Oct 31, 2016
aa5ca2e
UPSTREAM: <drop>: Continue to carry the cAdvisor patch - revert
soltysh Oct 31, 2016
013e890
Add cloud.google.com to supported hosts
soltysh Oct 31, 2016
ab858ac
bump(k8s.io/client-go): d72c0e162789e1bbb33c33cfa26858a1375efe01
soltysh Oct 31, 2016
f7027fd
Generated clientset
soltysh Oct 31, 2016
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
  •  
  •  
  •  
589 changes: 370 additions & 219 deletions Godeps/Godeps.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package release_v1_4

import (
"github.com/golang/glog"
v1core "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_v1_4/typed/core/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
discovery "k8s.io/kubernetes/pkg/client/typed/discovery"
"k8s.io/kubernetes/pkg/util/flowcontrol"
)

type Interface interface {
Discovery() discovery.DiscoveryInterface
Core() v1core.CoreInterface
}

// Clientset contains the clients for groups. Each group has exactly one
// version included in a Clientset.
type Clientset struct {
*discovery.DiscoveryClient
*v1core.CoreClient
}

// Core retrieves the CoreClient
func (c *Clientset) Core() v1core.CoreInterface {
if c == nil {
return nil
}
return c.CoreClient
}

// Discovery retrieves the DiscoveryClient
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return c.DiscoveryClient
}

// NewForConfig creates a new Clientset for the given config.
func NewForConfig(c *restclient.Config) (*Clientset, error) {
configShallowCopy := *c
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
}
var clientset Clientset
var err error
clientset.CoreClient, err = v1core.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}

clientset.DiscoveryClient, err = discovery.NewDiscoveryClientForConfig(&configShallowCopy)
if err != nil {
glog.Errorf("failed to create the DiscoveryClient: %v", err)
return nil, err
}
return &clientset, nil
}

// NewForConfigOrDie creates a new Clientset for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *Clientset {
var clientset Clientset
clientset.CoreClient = v1core.NewForConfigOrDie(c)

clientset.DiscoveryClient = discovery.NewDiscoveryClientForConfigOrDie(c)
return &clientset
}

// New creates a new Clientset for the given RESTClient.
func New(c *restclient.RESTClient) *Clientset {
var clientset Clientset
clientset.CoreClient = v1core.New(c)

clientset.DiscoveryClient = discovery.NewDiscoveryClient(c)
return &clientset
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This package is generated by client-gen with arguments: --clientset-api-path=/oapi --clientset-name=release_v1_4 --clientset-path=github.com/openshift/origin/pkg/authorization/client/clientset_generated --go-header-file=hack/boilerplate.txt --input=[api/v1] --input-base=github.com/openshift/origin/pkg/authorization/api --output-base=../../..

// This package has the automatically generated clientset.
package release_v1_4
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package fake

import (
clientset "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_v1_4"
v1core "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_v1_4/typed/core/v1"
fakev1core "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_v1_4/typed/core/v1/fake"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/apimachinery/registered"
"k8s.io/kubernetes/pkg/client/testing/core"
"k8s.io/kubernetes/pkg/client/typed/discovery"
fakediscovery "k8s.io/kubernetes/pkg/client/typed/discovery/fake"
"k8s.io/kubernetes/pkg/runtime"
"k8s.io/kubernetes/pkg/watch"
)

// NewSimpleClientset returns a clientset that will respond with the provided objects.
// It's backed by a very simple object tracker that processes creates, updates and deletions as-is,
// without applying any validations and/or defaults. It shouldn't be considered a replacement
// for a real clientset and is mostly useful in simple unit tests.
func NewSimpleClientset(objects ...runtime.Object) *Clientset {
o := core.NewObjectTracker(api.Scheme, api.Codecs.UniversalDecoder())
for _, obj := range objects {
if err := o.Add(obj); err != nil {
panic(err)
}
}

fakePtr := core.Fake{}
fakePtr.AddReactor("*", "*", core.ObjectReaction(o, registered.RESTMapper()))

fakePtr.AddWatchReactor("*", core.DefaultWatchReactor(watch.NewFake(), nil))

return &Clientset{fakePtr}
}

// Clientset implements clientset.Interface. Meant to be embedded into a
// struct to get a default implementation. This makes faking out just the method
// you want to test easier.
type Clientset struct {
core.Fake
}

func (c *Clientset) Discovery() discovery.DiscoveryInterface {
return &fakediscovery.FakeDiscovery{Fake: &c.Fake}
}

var _ clientset.Interface = &Clientset{}

// Core retrieves the CoreClient
func (c *Clientset) Core() v1core.CoreInterface {
return &fakev1core.FakeCore{Fake: &c.Fake}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This package is generated by client-gen with arguments: --clientset-api-path=/oapi --clientset-name=release_v1_4 --clientset-path=github.com/openshift/origin/pkg/authorization/client/clientset_generated --go-header-file=hack/boilerplate.txt --input=[api/v1] --input-base=github.com/openshift/origin/pkg/authorization/api --output-base=../../..

// This package has the automatically generated fake clientset.
package fake
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package v1

import (
api "k8s.io/kubernetes/pkg/api"
registered "k8s.io/kubernetes/pkg/apimachinery/registered"
restclient "k8s.io/kubernetes/pkg/client/restclient"
serializer "k8s.io/kubernetes/pkg/runtime/serializer"
)

type CoreInterface interface {
GetRESTClient() *restclient.RESTClient
PoliciesGetter
}

// CoreClient is used to interact with features provided by the Core group.
type CoreClient struct {
*restclient.RESTClient
}

func (c *CoreClient) Policies(namespace string) PolicyInterface {
return newPolicies(c, namespace)
}

// NewForConfig creates a new CoreClient for the given config.
func NewForConfig(c *restclient.Config) (*CoreClient, error) {
config := *c
if err := setConfigDefaults(&config); err != nil {
return nil, err
}
client, err := restclient.RESTClientFor(&config)
if err != nil {
return nil, err
}
return &CoreClient{client}, nil
}

// NewForConfigOrDie creates a new CoreClient for the given config and
// panics if there is an error in the config.
func NewForConfigOrDie(c *restclient.Config) *CoreClient {
client, err := NewForConfig(c)
if err != nil {
panic(err)
}
return client
}

// New creates a new CoreClient for the given RESTClient.
func New(c *restclient.RESTClient) *CoreClient {
return &CoreClient{c}
}

func setConfigDefaults(config *restclient.Config) error {
// if core group is not registered, return an error
g, err := registered.Group("")
if err != nil {
return err
}
config.APIPath = "/oapi"
if config.UserAgent == "" {
config.UserAgent = restclient.DefaultKubernetesUserAgent()
}
// TODO: Unconditionally set the config.Version, until we fix the config.
//if config.Version == "" {
copyGroupVersion := g.GroupVersion
config.GroupVersion = &copyGroupVersion
//}

config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: api.Codecs}

return nil
}

// GetRESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *CoreClient) GetRESTClient() *restclient.RESTClient {
if c == nil {
return nil
}
return c.RESTClient
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This package is generated by client-gen with arguments: --clientset-api-path=/oapi --clientset-name=release_v1_4 --clientset-path=github.com/openshift/origin/pkg/authorization/client/clientset_generated --go-header-file=hack/boilerplate.txt --input=[api/v1] --input-base=github.com/openshift/origin/pkg/authorization/api --output-base=../../..

// This package has the automatically generated typed clients.
package v1
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This package is generated by client-gen with arguments: --clientset-api-path=/oapi --clientset-name=release_v1_4 --clientset-path=github.com/openshift/origin/pkg/authorization/client/clientset_generated --go-header-file=hack/boilerplate.txt --input=[api/v1] --input-base=github.com/openshift/origin/pkg/authorization/api --output-base=../../..

// Package fake has the automatically generated clients.
package fake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package fake

import (
v1 "github.com/openshift/origin/pkg/authorization/client/clientset_generated/release_v1_4/typed/core/v1"
restclient "k8s.io/kubernetes/pkg/client/restclient"
core "k8s.io/kubernetes/pkg/client/testing/core"
)

type FakeCore struct {
*core.Fake
}

func (c *FakeCore) Policies(namespace string) v1.PolicyInterface {
return &FakePolicies{c, namespace}
}

// GetRESTClient returns a RESTClient that is used to communicate
// with API server by this client implementation.
func (c *FakeCore) GetRESTClient() *restclient.RESTClient {
return nil
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package fake

import (
v1 "github.com/openshift/origin/pkg/authorization/api/v1"
api "k8s.io/kubernetes/pkg/api"
unversioned "k8s.io/kubernetes/pkg/api/unversioned"
core "k8s.io/kubernetes/pkg/client/testing/core"
labels "k8s.io/kubernetes/pkg/labels"
watch "k8s.io/kubernetes/pkg/watch"
)

// FakePolicies implements PolicyInterface
type FakePolicies struct {
Fake *FakeCore
ns string
}

var policiesResource = unversioned.GroupVersionResource{Group: "", Version: "v1", Resource: "policies"}

func (c *FakePolicies) Create(policy *v1.Policy) (result *v1.Policy, err error) {
obj, err := c.Fake.
Invokes(core.NewCreateAction(policiesResource, c.ns, policy), &v1.Policy{})

if obj == nil {
return nil, err
}
return obj.(*v1.Policy), err
}

func (c *FakePolicies) Update(policy *v1.Policy) (result *v1.Policy, err error) {
obj, err := c.Fake.
Invokes(core.NewUpdateAction(policiesResource, c.ns, policy), &v1.Policy{})

if obj == nil {
return nil, err
}
return obj.(*v1.Policy), err
}

func (c *FakePolicies) Delete(name string, options *api.DeleteOptions) error {
_, err := c.Fake.
Invokes(core.NewDeleteAction(policiesResource, c.ns, name), &v1.Policy{})

return err
}

func (c *FakePolicies) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
action := core.NewDeleteCollectionAction(policiesResource, c.ns, listOptions)

_, err := c.Fake.Invokes(action, &v1.PolicyList{})
return err
}

func (c *FakePolicies) Get(name string) (result *v1.Policy, err error) {
obj, err := c.Fake.
Invokes(core.NewGetAction(policiesResource, c.ns, name), &v1.Policy{})

if obj == nil {
return nil, err
}
return obj.(*v1.Policy), err
}

func (c *FakePolicies) List(opts api.ListOptions) (result *v1.PolicyList, err error) {
obj, err := c.Fake.
Invokes(core.NewListAction(policiesResource, c.ns, opts), &v1.PolicyList{})

if obj == nil {
return nil, err
}

label := opts.LabelSelector
if label == nil {
label = labels.Everything()
}
list := &v1.PolicyList{}
for _, item := range obj.(*v1.PolicyList).Items {
if label.Matches(labels.Set(item.Labels)) {
list.Items = append(list.Items, item)
}
}
return list, err
}

// Watch returns a watch.Interface that watches the requested policies.
func (c *FakePolicies) Watch(opts api.ListOptions) (watch.Interface, error) {
return c.Fake.
InvokesWatch(core.NewWatchAction(policiesResource, c.ns, opts))

}

// Patch applies the patch and returns the patched policy.
func (c *FakePolicies) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *v1.Policy, err error) {
obj, err := c.Fake.
Invokes(core.NewPatchSubresourceAction(policiesResource, c.ns, name, data, subresources...), &v1.Policy{})

if obj == nil {
return nil, err
}
return obj.(*v1.Policy), err
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package v1

type PolicyExpansion interface{}
Loading