Vendor: Update k8s version

Signed-off-by: Michał Żyłowski <michal.zylowski@intel.com>
This commit is contained in:
Michał Żyłowski 2017-02-03 14:41:32 +01:00
parent dfa93414c5
commit 52baf68d50
3756 changed files with 113013 additions and 92675 deletions

View file

@ -50,6 +50,7 @@ go_test(
"//plugin/pkg/scheduler/api:go_default_library",
"//plugin/pkg/scheduler/api/latest:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/types",
"//vendor:k8s.io/apimachinery/pkg/util/validation/field",

View file

@ -1,5 +1,8 @@
assignees:
- bgrant0607
reviewers:
- brendandburns
- thockin
- zmerlynn
approvers:
- brendandburns
- thockin
- zmerlynn

View file

@ -16,12 +16,12 @@ go_library(
"//cmd/libs/go2idl/client-gen/test_apis/testgroup/v1:go_default_library",
"//examples/apiserver/rest:go_default_library",
"//pkg/api:go_default_library",
"//pkg/genericapiserver:go_default_library",
"//pkg/genericapiserver/api/rest:go_default_library",
"//pkg/genericapiserver/authorizer:go_default_library",
"//pkg/genericapiserver/options:go_default_library",
"//pkg/genericapiserver/registry/generic:go_default_library",
"//pkg/genericapiserver/registry/rest:go_default_library",
"//pkg/genericapiserver/server:go_default_library",
"//pkg/genericapiserver/server/options:go_default_library",
"//pkg/kubeapiserver/options:go_default_library",
"//pkg/registry/generic:go_default_library",
"//pkg/storage/storagebackend:go_default_library",
"//vendor:github.com/golang/glog",
"//vendor:k8s.io/apimachinery/pkg/runtime/schema",

View file

@ -24,12 +24,12 @@ import (
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup/v1"
testgroupetcd "k8s.io/kubernetes/examples/apiserver/rest"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/genericapiserver"
"k8s.io/kubernetes/pkg/genericapiserver/api/rest"
"k8s.io/kubernetes/pkg/genericapiserver/authorizer"
genericoptions "k8s.io/kubernetes/pkg/genericapiserver/options"
"k8s.io/kubernetes/pkg/genericapiserver/registry/generic"
"k8s.io/kubernetes/pkg/genericapiserver/registry/rest"
genericapiserver "k8s.io/kubernetes/pkg/genericapiserver/server"
genericoptions "k8s.io/kubernetes/pkg/genericapiserver/server/options"
kubeoptions "k8s.io/kubernetes/pkg/kubeapiserver/options"
"k8s.io/kubernetes/pkg/registry/generic"
"k8s.io/kubernetes/pkg/storage/storagebackend"
// Install the testgroup API

View file

@ -14,14 +14,14 @@ go_library(
deps = [
"//cmd/libs/go2idl/client-gen/test_apis/testgroup:go_default_library",
"//pkg/api:go_default_library",
"//pkg/fields:go_default_library",
"//pkg/registry/generic:go_default_library",
"//pkg/registry/generic/registry:go_default_library",
"//pkg/genericapiserver/registry/generic:go_default_library",
"//pkg/genericapiserver/registry/generic/registry:go_default_library",
"//pkg/storage:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/fields",
"//vendor:k8s.io/apimachinery/pkg/labels",
"//vendor:k8s.io/apimachinery/pkg/runtime",
"//vendor:k8s.io/apimachinery/pkg/util/validation/field",
"//vendor:k8s.io/apiserver/pkg/request",
"//vendor:k8s.io/apiserver/pkg/endpoints/request",
"//vendor:k8s.io/apiserver/pkg/storage/names",
],
)

View file

@ -19,16 +19,16 @@ package rest
import (
"fmt"
"k8s.io/apimachinery/pkg/fields"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/validation/field"
genericapirequest "k8s.io/apiserver/pkg/request"
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
"k8s.io/apiserver/pkg/storage/names"
"k8s.io/kubernetes/cmd/libs/go2idl/client-gen/test_apis/testgroup"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/registry/generic"
genericregistry "k8s.io/kubernetes/pkg/registry/generic/registry"
"k8s.io/kubernetes/pkg/genericapiserver/registry/generic"
genericregistry "k8s.io/kubernetes/pkg/genericapiserver/registry/generic/registry"
"k8s.io/kubernetes/pkg/storage"
)

View file

@ -4,7 +4,7 @@ This is a toy example demonstrating how to use kubernetes DNS.
### Step Zero: Prerequisites
This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](../../build/kube-dns/).
This example assumes that you have forked the repository and [turned up a Kubernetes cluster](../../docs/getting-started-guides/). Make sure DNS is enabled in your setup, see [DNS doc](https://github.com/kubernetes/dns).
```sh
$ cd kubernetes

View file

@ -26,6 +26,8 @@ import (
"testing"
"github.com/golang/glog"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/validation/field"
@ -48,7 +50,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
switch t := obj.(type) {
case *api.ReplicationController:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateReplicationController(t)
case *api.ReplicationControllerList:
@ -57,7 +59,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
}
case *api.Service:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateService(t)
case *api.ServiceList:
@ -66,7 +68,7 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
}
case *api.Pod:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePod(t)
case *api.PodList:
@ -77,44 +79,44 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
errors = validation.ValidatePersistentVolume(t)
case *api.PersistentVolumeClaim:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePersistentVolumeClaim(t)
case *api.PodTemplate:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidatePodTemplate(t)
case *api.Endpoints:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateEndpoints(t)
case *api.Namespace:
errors = validation.ValidateNamespace(t)
case *api.Secret:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateSecret(t)
case *api.LimitRange:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateLimitRange(t)
case *api.ResourceQuota:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = validation.ValidateResourceQuota(t)
case *extensions.Deployment:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateDeployment(t)
case *batch.Job:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
// Job needs generateSelector called before validation, and job.Validate does this.
// See: https://github.com/kubernetes/kubernetes/issues/20951#issuecomment-187787040
@ -122,17 +124,17 @@ func validateObject(obj runtime.Object) (errors field.ErrorList) {
errors = job.Strategy.Validate(nil, t)
case *extensions.Ingress:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateIngress(t)
case *extensions.DaemonSet:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = expvalidation.ValidateDaemonSet(t)
case *apps.StatefulSet:
if t.Namespace == "" {
t.Namespace = api.NamespaceDefault
t.Namespace = metav1.NamespaceDefault
}
errors = appsvalidation.ValidateStatefulSet(t)
default:

View file

@ -103,11 +103,11 @@ Before continuing to the gory details, we also recommend you to read [Quick walk
#### Define a Deployment
To start the redis master, use the file `examples/guestbook/redis-master-deployment.yaml`, which describes a single [pod](../../docs/user-guide/pods.md) running a redis key-value server in a container.
To start the redis master, use the file [redis-master-deployment.yaml](redis-master-deployment.yaml), which describes a single [pod](../../docs/user-guide/pods.md) running a redis key-value server in a container.
Although we have a single instance of our redis master, we are using a [Deployment](../../docs/user-guide/deployments.md) to enforce that exactly one pod keeps running. E.g., if the node were to go down, the Deployment will ensure that the redis master gets restarted on a healthy node. (In our simplified example, this could result in data loss.)
The file `examples/guestbook/redis-master-deployment.yaml` defines the redis master Deployment:
The file [redis-master-deployment.yaml](redis-master-deployment.yaml) defines the redis master Deployment:
<!-- BEGIN MUNGE: EXAMPLE redis-master-deployment.yaml -->
@ -161,7 +161,7 @@ A Kubernetes [Service](../../docs/user-guide/services.md) is a named load balanc
Services find the pods to load balance based on the pods' labels.
The selector field of the Service description determines which pods will receive the traffic sent to the Service, and the `port` and `targetPort` information defines what port the Service proxy will run at.
The file `examples/guestbook/redis-master-service.yaml` defines the redis master Service:
The file [redis-master-service.yaml](redis-master-deployment.yaml) defines the redis master Service:
<!-- BEGIN MUNGE: EXAMPLE redis-master-service.yaml -->
@ -233,7 +233,7 @@ This example has been configured to use the DNS service by default.
If your cluster does not have the DNS service enabled, then you can use environment variables by setting the
`GET_HOSTS_FROM` env value in both
`examples/guestbook/redis-slave-deployment.yaml` and `examples/guestbook/frontend-deployment.yaml`
[redis-slave-deployment.yaml](redis-slave-deployment.yaml) and [frontend-deployment.yaml](frontend-deployment.yaml)
from `dns` to `env` before you start up the app.
(However, this is unlikely to be necessary. You can check for the DNS service in the list of the cluster's services by
running `kubectl --namespace=kube-system get rc -l k8s-app=kube-dns`.)
@ -345,7 +345,7 @@ In Kubernetes, a Deployment is responsible for managing multiple instances of a
Just like the master, we want to have a Service to proxy connections to the redis slaves. In this case, in addition to discovery, the slave Service will provide transparent load balancing to web app clients.
This time we put the Service and Deployment into one [file](../../docs/user-guide/managing-deployments.md#organizing-resource-configurations). Grouping related objects together in a single file is often better than having separate files.
The specification for the slaves is in `examples/guestbook/all-in-one/redis-slave.yaml`:
The specification for the slaves is in [all-in-one/redis-slave.yaml](all-in-one/redis-slave.yaml):
<!-- BEGIN MUNGE: EXAMPLE all-in-one/redis-slave.yaml -->
@ -455,7 +455,7 @@ A frontend pod is a simple PHP server that is configured to talk to either the s
Again we'll create a set of replicated frontend pods instantiated by a Deployment — this time, with three replicas.
As with the other pods, we now want to create a Service to group the frontend pods.
The Deployment and Service are described in the file `frontend.yaml`:
The Deployment and Service are described in the file [all-in-one/frontend.yaml](all-in-one/frontend.yaml):
<!-- BEGIN MUNGE: EXAMPLE all-in-one/frontend.yaml -->
@ -529,7 +529,7 @@ spec:
For supported cloud providers, such as Google Compute Engine or Google Container Engine, you can specify to use an external load balancer
in the service `spec`, to expose the service onto an external load balancer IP.
To do this, uncomment the `type: LoadBalancer` line in the `frontend.yaml` file before you start the service.
To do this, uncomment the `type: LoadBalancer` line in the [all-in-one/frontend.yaml](all-in-one/frontend.yaml) file before you start the service.
[See the appendix below](#appendix-accessing-the-guestbook-site-externally) on accessing the guestbook site externally for more details.

View file

@ -21,6 +21,7 @@ go_library(
deps = [
"//pkg/api:go_default_library",
"//pkg/api/install:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
],
)

View file

@ -26,6 +26,7 @@ import (
"io/ioutil"
"log"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/api"
@ -57,7 +58,7 @@ func main() {
nginxCrt := read(*crt)
nginxKey := read(*key)
secret := &api.Secret{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: "nginxsecret",
},
Data: map[string][]byte{

View file

@ -1,2 +1,20 @@
assignees:
- jeffmendoza
approvers:
- jeffmendoza
reviewers:
- thockin
- lavalamp
- brendandburns
- caesarxuchao
- mikedanese
- davidopp
- pmorie
- dchen1107
- janetkuo
- roberthbailey
- eparis
- mwielgus
- jlowdermilk
- david-mcmahon
- jeffvance
- jeffmendoza
- RichieEscarez

View file

@ -67,7 +67,7 @@ this example.
* Kubernetes version 1.2 is required due to using newer features, such
at PV Claims and Deployments. Run `kubectl version` to see your
cluster version.
* [Cluster DNS](../../build/kube-dns/) will be used for service discovery.
* [Cluster DNS](https://github.com/kubernetes/dns) will be used for service discovery.
* An [external load balancer](http://kubernetes.io/docs/user-guide/services/#type-loadbalancer)
will be used to access WordPress.
* [Persistent Volume Claims](http://kubernetes.io/docs/user-guide/persistent-volumes/)

View file

@ -20,6 +20,7 @@ go_library(
tags = ["automanaged"],
deps = [
"//pkg/api:go_default_library",
"//vendor:k8s.io/apimachinery/pkg/apis/meta/v1",
"//vendor:k8s.io/apimachinery/pkg/runtime",
],
)

View file

@ -23,6 +23,7 @@ import (
"io/ioutil"
"log"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/kubernetes/pkg/api"
)
@ -50,7 +51,7 @@ func main() {
}
cfg := read(*kubeconfig)
secret := &api.Secret{
ObjectMeta: api.ObjectMeta{
ObjectMeta: metav1.ObjectMeta{
Name: *name,
Namespace: *ns,
},

View file

@ -24,7 +24,7 @@ This example assumes
- You have a Kubernetes cluster installed and running.
- That you have installed the ```kubectl``` command line tool installed in your path and configured to talk to your Kubernetes cluster
- That your Kubernetes cluster is running [kube-dns](../../build/kube-dns/) or an equivalent integration.
- That your Kubernetes cluster is running [kube-dns](https://github.com/kubernetes/dns) or an equivalent integration.
Optionally, your Kubernetes cluster should be configured with a Loadbalancer integration (automatically configured via kube-up or GKE)

View file

@ -34,6 +34,10 @@ spec:
capabilities:
add:
- IPC_LOCK
lifecycle:
preStop:
exec:
command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"]
env:
- name: MAX_HEAP_SIZE
value: 512M