Merge pull request #991 from runcom/kube-1.7.8

bump to kube v1.7.8
This commit is contained in:
Mrunal Patel 2017-10-10 07:41:40 -07:00 committed by GitHub
commit bbd7321a7a
26 changed files with 43 additions and 110 deletions

View file

@ -1,4 +1,4 @@
k8s.io/kubernetes v1.7.6 https://github.com/kubernetes/kubernetes
k8s.io/kubernetes v1.7.8 https://github.com/kubernetes/kubernetes
k8s.io/client-go release-4.0 https://github.com/kubernetes/client-go
k8s.io/apimachinery release-1.7 https://github.com/kubernetes/apimachinery
k8s.io/apiserver release-1.7 https://github.com/kubernetes/apiserver

View file

@ -1,97 +0,0 @@
// +build ignore
// Simple tool to create an archive stream from an old and new directory
//
// By default it will stream the comparison of two temporary directories with junk files
package main
import (
"flag"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"github.com/containers/storage/pkg/archive"
"github.com/sirupsen/logrus"
)
var (
flDebug = flag.Bool("D", false, "debugging output")
flNewDir = flag.String("newdir", "", "")
flOldDir = flag.String("olddir", "", "")
log = logrus.New()
)
func main() {
flag.Usage = func() {
fmt.Println("Produce a tar from comparing two directory paths. By default a demo tar is created of around 200 files (including hardlinks)")
fmt.Printf("%s [OPTIONS]\n", os.Args[0])
flag.PrintDefaults()
}
flag.Parse()
log.Out = os.Stderr
if (len(os.Getenv("DEBUG")) > 0) || *flDebug {
logrus.SetLevel(logrus.DebugLevel)
}
var newDir, oldDir string
if len(*flNewDir) == 0 {
var err error
newDir, err = ioutil.TempDir("", "storage-test-newDir")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(newDir)
if _, err := prepareUntarSourceDirectory(100, newDir, true); err != nil {
log.Fatal(err)
}
} else {
newDir = *flNewDir
}
if len(*flOldDir) == 0 {
oldDir, err := ioutil.TempDir("", "storage-test-oldDir")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(oldDir)
} else {
oldDir = *flOldDir
}
changes, err := archive.ChangesDirs(newDir, oldDir)
if err != nil {
log.Fatal(err)
}
a, err := archive.ExportChanges(newDir, changes)
if err != nil {
log.Fatal(err)
}
defer a.Close()
i, err := io.Copy(os.Stdout, a)
if err != nil && err != io.EOF {
log.Fatal(err)
}
fmt.Fprintf(os.Stderr, "wrote archive of %d bytes", i)
}
func prepareUntarSourceDirectory(numberOfFiles int, targetPath string, makeLinks bool) (int, error) {
fileData := []byte("fooo")
for n := 0; n < numberOfFiles; n++ {
fileName := fmt.Sprintf("file-%d", n)
if err := ioutil.WriteFile(path.Join(targetPath, fileName), fileData, 0700); err != nil {
return 0, err
}
if makeLinks {
if err := os.Link(path.Join(targetPath, fileName), path.Join(targetPath, fileName+"-link")); err != nil {
return 0, err
}
}
}
totalSize := numberOfFiles * len(fileData)
return totalSize, nil
}

View file

@ -346,7 +346,7 @@ message ListOptions {
}
// MicroTime is version of Time with microsecond level precision.
//
//
// +protobuf.options.marshal=false
// +protobuf.as=Timestamp
// +protobuf.options.(gogoproto.goproto_stringer)=false
@ -504,7 +504,7 @@ message ObjectMeta {
// this object has been completely initialized. Otherwise, the object is considered uninitialized
// and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
// observe uninitialized objects.
//
//
// When an object is created, the system will populate this list with the current set of initializers.
// Only privileged users may set or modify this list. Once it is empty, it may not be modified further
// by any user.

View file

@ -52,3 +52,4 @@ message TableOptions {
// in version v1alpha1 of the meta.k8s.io API group.
optional string includeObject = 1;
}

View file

@ -314,7 +314,7 @@ message ConfigMapList {
}
// Adapts a ConfigMap into a projected volume.
//
//
// The contents of the target ConfigMap's Data field will be presented in a
// projected volume as files using the keys in the Data field as the file names,
// unless the items element is populated with specific mappings of keys to paths.
@ -1936,7 +1936,7 @@ message ObjectMeta {
// this object has been completely initialized. Otherwise, the object is considered uninitialized
// and is hidden (in list/watch and get calls) from clients that haven't explicitly asked to
// observe uninitialized objects.
//
//
// When an object is created, the system will populate this list with the current set of initializers.
// Only privileged users may set or modify this list. Once it is empty, it may not be modified further
// by any user.
@ -3424,7 +3424,7 @@ message SecretList {
}
// Adapts a secret into a projected volume.
//
//
// The contents of the target Secret's Data field will be presented in a
// projected volume as files using the keys in the Data field as the file names.
// Note that this is identical to a secret volume source without the default

View file

@ -159,7 +159,7 @@ message Rule {
repeated string apiVersions = 2;
// Resources is a list of resources this rule applies to.
//
//
// For example:
// 'pods' means pods.
// 'pods/log' means the log subresource of pods.
@ -167,10 +167,10 @@ message Rule {
// 'pods/*' means all subresources of pods.
// '*/scale' means all scale subresources.
// '*/*' means all resources and their subresources.
//
//
// If wildcard is present, the validation rule will ensure resources do not
// overlap with each other.
//
//
// Depending on the enclosing object, subresources might not be allowed.
// Required.
repeated string resources = 3;
@ -200,3 +200,4 @@ message ServiceReference {
// Required
optional string name = 2;
}

View file

@ -438,3 +438,4 @@ message StatefulSetUpdateStrategy {
// RollingUpdate is used to communicate parameters when Type is RollingUpdateStatefulSetStrategyType.
optional RollingUpdateStatefulSetStrategy rollingUpdate = 2;
}

View file

@ -96,3 +96,4 @@ message UserInfo {
// +optional
map<string, ExtraValue> extra = 4;
}

View file

@ -96,3 +96,4 @@ message UserInfo {
// +optional
map<string, ExtraValue> extra = 4;
}

View file

@ -180,3 +180,4 @@ message SubjectAccessReviewStatus {
// +optional
optional string evaluationError = 3;
}

View file

@ -180,3 +180,4 @@ message SubjectAccessReviewStatus {
// +optional
optional string evaluationError = 3;
}

View file

@ -318,3 +318,4 @@ message ScaleStatus {
// +optional
optional string selector = 2;
}

View file

@ -299,3 +299,4 @@ message ResourceMetricStatus {
// It will always be set, regardless of the corresponding metric specification.
optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;
}

View file

@ -165,3 +165,4 @@ message JobStatus {
// +optional
optional int32 failed = 6;
}

View file

@ -130,3 +130,4 @@ message JobTemplateSpec {
// +optional
optional k8s.io.client_go.pkg.apis.batch.v1.JobSpec spec = 2;
}

View file

@ -119,3 +119,4 @@ message ExtraValue {
repeated string items = 1;
}

View file

@ -1019,3 +1019,4 @@ message ThirdPartyResourceList {
// Items is the list of ThirdPartyResources.
repeated ThirdPartyResource items = 2;
}

View file

@ -124,3 +124,4 @@ message NetworkPolicySpec {
// +optional
repeated NetworkPolicyIngressRule ingress = 2;
}

View file

@ -111,3 +111,4 @@ message PodDisruptionBudgetStatus {
// total number of pods counted by this disruption budget
optional int32 expectedPods = 6;
}

View file

@ -197,3 +197,4 @@ message Subject {
// +optional
optional string namespace = 4;
}

View file

@ -195,3 +195,4 @@ message Subject {
// +optional
optional string namespace = 4;
}

View file

@ -72,3 +72,4 @@ message PodPresetSpec {
// +optional
repeated k8s.io.client_go.pkg.api.v1.VolumeMount volumeMounts = 5;
}

View file

@ -31,7 +31,7 @@ option go_package = "v1";
// StorageClass describes the parameters for a class of storage for
// which PersistentVolumes can be dynamically provisioned.
//
//
// StorageClasses are non-namespaced; the name of the storage class
// according to etcd is in ObjectMeta.Name.
message StorageClass {
@ -59,3 +59,4 @@ message StorageClassList {
// Items is the list of StorageClasses
repeated StorageClass items = 2;
}

View file

@ -31,7 +31,7 @@ option go_package = "v1beta1";
// StorageClass describes the parameters for a class of storage for
// which PersistentVolumes can be dynamically provisioned.
//
//
// StorageClasses are non-namespaced; the name of the storage class
// according to etcd is in ObjectMeta.Name.
message StorageClass {
@ -59,3 +59,4 @@ message StorageClassList {
// Items is the list of StorageClasses
repeated StorageClass items = 2;
}

View file

@ -2706,6 +2706,16 @@ func ValidatePodUpdate(newPod, oldPod *api.Pod) field.ErrorList {
// handle updateable fields by munging those fields prior to deep equal comparison.
mungedPod := *newPod
// allow hostname and subdomain to be updated if they are empty. This allows for migration between the beta
// annotations and the GA field when upgrading between Kubernetes 1.6.x and 1.7.x.
if oldPod.Spec.Hostname == "" {
mungedPod.Spec.Hostname = oldPod.Spec.Hostname
}
if oldPod.Spec.Subdomain == "" {
mungedPod.Spec.Subdomain = oldPod.Spec.Subdomain
}
// munge spec.containers[*].image
var newContainers []api.Container
for ix, container := range mungedPod.Spec.Containers {

View file

@ -349,7 +349,7 @@ func NewRoleBindingForClusterRole(roleName, namespace string) *RoleBindingBuilde
// Groups adds the specified groups as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
for _, group := range groups {
r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: GroupKind, Name: group})
r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: GroupKind, APIGroup: GroupName, Name: group})
}
return r
}
@ -357,7 +357,7 @@ func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
// Users adds the specified users as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder {
for _, user := range users {
r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: UserKind, Name: user})
r.RoleBinding.Subjects = append(r.RoleBinding.Subjects, Subject{Kind: UserKind, APIGroup: GroupName, Name: user})
}
return r
}