Skip to content

Commit 2ef903b

Browse files
authored
Merge pull request #125 from droot/k8s-1.11
updated k8s deps to 1.11.2 version
2 parents 3db8d34 + cf38147 commit 2ef903b

File tree

873 files changed

+17855
-14345
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

873 files changed

+17855
-14345
lines changed

Gopkg.lock

+58-24
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ required = ["sigs.k8s.io/testing_frameworks/integration",
2424

2525
[[constraint]]
2626
name = "k8s.io/api"
27-
version = "kubernetes-1.10.1"
27+
version = "kubernetes-1.11.2"
2828

2929
[[constraint]]
3030
name = "k8s.io/apiextensions-apiserver"
31-
version = "kubernetes-1.10.1"
31+
version = "kubernetes-1.11.2"
3232

3333
[[constraint]]
3434
name = "k8s.io/apimachinery"
35-
version = "kubernetes-1.10.1"
35+
version = "kubernetes-1.11.2"
3636

3737
[[constraint]]
3838
name = "k8s.io/client-go"
39-
version = "kubernetes-1.10.1"
39+
version = "kubernetes-1.11.2"
4040

4141
[[constraint]]
4242
name = "github.com/onsi/ginkgo"

pkg/admission/cert/writer/secret.go

+19-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (s *SecretCertWriter) parseAnnotations(annotations map[string]string, secre
101101
if strings.HasPrefix(k, SecretCertProvisionAnnotationKeyPrefix) {
102102
webhookName := strings.TrimPrefix(k, SecretCertProvisionAnnotationKeyPrefix)
103103
secretWebhookMap[webhookName] = &webhookAndSecret{
104-
secret: types.NewNamespacedNameFromString(v),
104+
secret: newNamespacedNameFromString(v),
105105
}
106106
}
107107
}
@@ -182,6 +182,24 @@ func (s *secretReadWriter) read(webhookName string) (*generator.Artifacts, error
182182
return secretToCerts(secret), err
183183
}
184184

185+
// newNamespacedNameFromString parses the provided string and returns a NamespacedName.
186+
// The expected format is as per String() above.
187+
// If the input string is invalid, the returned NamespacedName has all empty string field values.
188+
// This allows a single-value return from this function, while still allowing error checks in the caller.
189+
// Note that an input string which does not include exactly one Separator is not a valid input (as it could never
190+
// have neem returned by String() )
191+
// NOTE: https://github.com/kubernetes/apimachinery/commit/2b167bb262168a225efe64d1fdc40ea97870ca9e removed this from
192+
// "k8s.io/apimachinery/pkg/types". Code copied here.
193+
func newNamespacedNameFromString(s string) types.NamespacedName {
194+
nn := types.NamespacedName{}
195+
result := strings.Split(s, string(types.Separator))
196+
if len(result) == 2 {
197+
nn.Namespace = result[0]
198+
nn.Name = result[1]
199+
}
200+
return nn
201+
}
202+
185203
func secretToCerts(secret *corev1.Secret) *generator.Artifacts {
186204
if secret.Data == nil {
187205
return nil

pkg/cache/internal/informers_map.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,14 @@ func (ip *InformersMap) newListWatch(gvk schema.GroupVersionKind) (*cache.ListWa
217217
return &cache.ListWatch{
218218
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
219219
res := listObj.DeepCopyObject()
220-
err := client.Get().Resource(mapping.Resource).VersionedParams(&opts, ip.paramCodec).Do().Into(res)
220+
err := client.Get().Resource(mapping.Resource.Resource).VersionedParams(&opts, ip.paramCodec).Do().Into(res)
221221
return res, err
222222
},
223223
// Setup the watch function
224224
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
225225
// Watch needs to be set to true separately
226226
opts.Watch = true
227-
return client.Get().Resource(mapping.Resource).VersionedParams(&opts, ip.paramCodec).Watch()
227+
return client.Get().Resource(mapping.Resource.Resource).VersionedParams(&opts, ip.paramCodec).Watch()
228228
},
229229
}, nil
230230
}

pkg/client/apiutil/apimachinery.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ import (
2424
"k8s.io/apimachinery/pkg/runtime/schema"
2525
"k8s.io/apimachinery/pkg/runtime/serializer"
2626
"k8s.io/client-go/discovery"
27-
"k8s.io/client-go/dynamic"
2827
"k8s.io/client-go/rest"
28+
"k8s.io/client-go/restmapper"
2929
)
3030

3131
// NewDiscoveryRESTMapper constructs a new RESTMapper based on discovery
3232
// information fetched by a new client with the given config.
3333
func NewDiscoveryRESTMapper(c *rest.Config) (meta.RESTMapper, error) {
3434
// Get a mapper
3535
dc := discovery.NewDiscoveryClientForConfigOrDie(c)
36-
gr, err := discovery.GetAPIGroupResources(dc)
36+
gr, err := restmapper.GetAPIGroupResources(dc)
3737
if err != nil {
3838
return nil, err
3939
}
40-
return discovery.NewRESTMapper(gr, dynamic.VersionInterfaces), nil
40+
return restmapper.NewDiscoveryRESTMapper(gr), nil
4141
}
4242

4343
// GVKForObject finds the GroupVersionKind associated with the given object, if there is only a single such GVK.

pkg/client/client_cache.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func (r *resourceMeta) isNamespaced() bool {
132132

133133
// resource returns the resource name of the type
134134
func (r *resourceMeta) resource() string {
135-
return r.mapping.Resource
135+
return r.mapping.Resource.Resource
136136
}
137137

138138
// objMeta stores type and object information about a Kubernetes type

vendor/github.com/google/btree/.travis.yml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)