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/client-go release-4.0 https://github.com/kubernetes/client-go
k8s.io/apimachinery release-1.7 https://github.com/kubernetes/apimachinery k8s.io/apimachinery release-1.7 https://github.com/kubernetes/apimachinery
k8s.io/apiserver release-1.7 https://github.com/kubernetes/apiserver 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

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

View file

@ -200,3 +200,4 @@ message ServiceReference {
// Required // Required
optional string name = 2; optional string name = 2;
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -59,3 +59,4 @@ message StorageClassList {
// Items is the list of StorageClasses // Items is the list of StorageClasses
repeated StorageClass items = 2; repeated StorageClass items = 2;
} }

View file

@ -59,3 +59,4 @@ message StorageClassList {
// Items is the list of StorageClasses // Items is the list of StorageClasses
repeated StorageClass items = 2; 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. // handle updateable fields by munging those fields prior to deep equal comparison.
mungedPod := *newPod 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 // munge spec.containers[*].image
var newContainers []api.Container var newContainers []api.Container
for ix, container := range mungedPod.Spec.Containers { 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. // Groups adds the specified groups as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder { func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
for _, group := range groups { 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 return r
} }
@ -357,7 +357,7 @@ func (r *RoleBindingBuilder) Groups(groups ...string) *RoleBindingBuilder {
// Users adds the specified users as the subjects of the RoleBinding. // Users adds the specified users as the subjects of the RoleBinding.
func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder { func (r *RoleBindingBuilder) Users(users ...string) *RoleBindingBuilder {
for _, user := range users { 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 return r
} }